pub(crate) trait StreamingDecryptor: Sized {
// Required method
fn update(
&mut self,
ciphertext_chunk: &[u8],
last_block: bool,
) -> ChunkDecryptionResult;
}Expand description
A symmetric streaming decryptor.
Required Methods§
Sourcefn update(
&mut self,
ciphertext_chunk: &[u8],
last_block: bool,
) -> ChunkDecryptionResult
fn update( &mut self, ciphertext_chunk: &[u8], last_block: bool, ) -> ChunkDecryptionResult
Pass in a chunk of any size of the stream. The decryptor buffers and emits as much plaintext
as it can. The caller signals the end of the stream by calling update with last_block = true. The decryptor emits the final chunk of plaintext and performs any final
authentication checks if required. The caller MUST verify the presence of the final
decrypted chunk before using the plaintext.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.