Trait block_cipher_trait::BlockCipher [] [src]

pub trait BlockCipher {
    type BlockSize: ArrayLength<u8>;
    fn encrypt_block(&self, block: &mut GenericArray<u8, Self::BlockSize>);
fn decrypt_block(&self, block: &mut GenericArray<u8, Self::BlockSize>); fn encrypt_blocks(&self, blocks: &mut [u8]) { ... }
fn decrypt_blocks(&self, blocks: &mut [u8]) { ... } }

Main block cipher trait which defines in-place encryption and decryption over single block

Associated Types

Required Methods

Encrypt block in-place

Decrypt block in-place

Provided Methods

Encrypt several blocks in-place. Will panic if slice length is not multiple of block size.

Default implementations will just iterate over blocks and will use encrypt_block on them, but some ciphers could utilize instruction level parallelism to speed-up computations

Decrypt several blocks in-place. Will panic if slice length is not multiple of block size.

Default implementations will just iterate over blocks and will use decrypt_block on them, but some ciphers could utilize instruction level parallelism to speed-up computations

Implementors