Trait aes::BlockEncrypt
source · pub trait BlockEncrypt: BlockCipher {
// Required method
fn encrypt_block(&self, block: &mut GenericArray<u8, Self::BlockSize>);
// Provided methods
fn encrypt_par_blocks(
&self,
blocks: &mut GenericArray<GenericArray<u8, Self::BlockSize>, Self::ParBlocks>
) { ... }
fn encrypt_blocks(&self, blocks: &mut [GenericArray<u8, Self::BlockSize>]) { ... }
}
Expand description
Encrypt-only functionality for block ciphers.
Required Methods§
sourcefn encrypt_block(&self, block: &mut GenericArray<u8, Self::BlockSize>)
fn encrypt_block(&self, block: &mut GenericArray<u8, Self::BlockSize>)
Encrypt block in-place
Provided Methods§
sourcefn encrypt_par_blocks(
&self,
blocks: &mut GenericArray<GenericArray<u8, Self::BlockSize>, Self::ParBlocks>
)
fn encrypt_par_blocks( &self, blocks: &mut GenericArray<GenericArray<u8, Self::BlockSize>, Self::ParBlocks> )
Encrypt several blocks in parallel using instruction level parallelism if possible.
If ParBlocks
equals to 1 it’s equivalent to encrypt_block
.
sourcefn encrypt_blocks(&self, blocks: &mut [GenericArray<u8, Self::BlockSize>])
fn encrypt_blocks(&self, blocks: &mut [GenericArray<u8, Self::BlockSize>])
Encrypt a slice of blocks, leveraging parallelism when available.