Trait cipher::block::BlockCipherMut [−][src]
pub trait BlockCipherMut {
type BlockSize: ArrayLength<u8>;
fn encrypt_block(&mut self, block: &mut GenericArray<u8, Self::BlockSize>);
fn decrypt_block(&mut self, block: &mut GenericArray<u8, Self::BlockSize>);
}
Expand description
Stateful block cipher which permits &mut self
access.
The main use case for this trait is hardware encryption engines which
require &mut self
access to an underlying hardware peripheral.
Associated Types
type BlockSize: ArrayLength<u8>
type BlockSize: ArrayLength<u8>
Size of the block in bytes
Required methods
fn encrypt_block(&mut self, block: &mut GenericArray<u8, Self::BlockSize>)
fn encrypt_block(&mut self, block: &mut GenericArray<u8, Self::BlockSize>)
Encrypt block in-place
fn decrypt_block(&mut self, block: &mut GenericArray<u8, Self::BlockSize>)
fn decrypt_block(&mut self, block: &mut GenericArray<u8, Self::BlockSize>)
Decrypt block in-place