pub trait CbcCipher: Send {
// Required methods
fn block_len(&self) -> usize;
fn encrypt_blocks(
&mut self,
iv: &[u8],
blocks: &mut [u8],
) -> Result<(), CryptoError>;
fn decrypt_blocks(
&mut self,
iv: &[u8],
blocks: &mut [u8],
) -> Result<(), CryptoError>;
}Expand description
A keyed CBC block cipher with a reusable expanded key.
Required Methods§
Sourcefn encrypt_blocks(
&mut self,
iv: &[u8],
blocks: &mut [u8],
) -> Result<(), CryptoError>
fn encrypt_blocks( &mut self, iv: &[u8], blocks: &mut [u8], ) -> Result<(), CryptoError>
Encrypts whole blocks in place without applying padding.
Sourcefn decrypt_blocks(
&mut self,
iv: &[u8],
blocks: &mut [u8],
) -> Result<(), CryptoError>
fn decrypt_blocks( &mut self, iv: &[u8], blocks: &mut [u8], ) -> Result<(), CryptoError>
Decrypts whole blocks in place without removing padding.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".