Trait cipher::BlockEncrypt
source · [−]pub trait BlockEncrypt: BlockCipher {
fn encrypt_block(&self, block: &mut Block<Self>);
fn encrypt_par_blocks(&self, blocks: &mut ParBlocks<Self>) { ... }
fn encrypt_blocks(&self, blocks: &mut [Block<Self>]) { ... }
}
Expand description
Encrypt-only functionality for block ciphers.
Required Methods
sourcefn encrypt_block(&self, block: &mut Block<Self>)
fn encrypt_block(&self, block: &mut Block<Self>)
Encrypt block in-place
Provided Methods
sourcefn encrypt_par_blocks(&self, blocks: &mut ParBlocks<Self>)
fn encrypt_par_blocks(&self, blocks: &mut ParBlocks<Self>)
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 [Block<Self>])
fn encrypt_blocks(&self, blocks: &mut [Block<Self>])
Encrypt a slice of blocks, leveraging parallelism when available.