Skip to main content

CbcCipher

Trait CbcCipher 

Source
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§

Source

fn block_len(&self) -> usize

Returns the block and IV length in bytes.

Source

fn encrypt_blocks( &mut self, iv: &[u8], blocks: &mut [u8], ) -> Result<(), CryptoError>

Encrypts whole blocks in place without applying padding.

Source

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".

Implementors§