Trait aes::BlockCipher [−][src]
The trait which defines in-place encryption and decryption over single block or several blocks in parallel.
Associated Types
type BlockSize: ArrayLength<u8>[src]
Size of the block in bytes
type ParBlocks: ArrayLength<GenericArray<u8, Self::BlockSize>>[src]
Number of blocks which can be processed in parallel by cipher implementation
Required methods
pub fn encrypt_block(&self, block: &mut GenericArray<u8, Self::BlockSize>)[src]
Encrypt block in-place
pub fn decrypt_block(&self, block: &mut GenericArray<u8, Self::BlockSize>)[src]
Decrypt block in-place
Provided methods
pub fn encrypt_blocks(
&self,
blocks: &mut GenericArray<GenericArray<u8, Self::BlockSize>, Self::ParBlocks>
)[src]
&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.
pub fn decrypt_blocks(
&self,
blocks: &mut GenericArray<GenericArray<u8, Self::BlockSize>, Self::ParBlocks>
)[src]
&self,
blocks: &mut GenericArray<GenericArray<u8, Self::BlockSize>, Self::ParBlocks>
)
Decrypt several blocks in parallel using instruction level parallelism if possible.
If ParBlocks equals to 1 it’s equivalent to decrypt_block.
Implementations on Foreign Types
impl<'_, Alg> BlockCipher for &'_ Alg where
Alg: BlockCipher, [src]
Alg: BlockCipher,
type BlockSize = <Alg as BlockCipher>::BlockSize
type ParBlocks = <Alg as BlockCipher>::ParBlocks
pub fn encrypt_block(
&self,
block: &mut GenericArray<u8, <&'_ Alg as BlockCipher>::BlockSize>
)[src]
&self,
block: &mut GenericArray<u8, <&'_ Alg as BlockCipher>::BlockSize>
)
pub fn decrypt_block(
&self,
block: &mut GenericArray<u8, <&'_ Alg as BlockCipher>::BlockSize>
)[src]
&self,
block: &mut GenericArray<u8, <&'_ Alg as BlockCipher>::BlockSize>
)
pub fn encrypt_blocks(
&self,
blocks: &mut GenericArray<GenericArray<u8, <&'_ Alg as BlockCipher>::BlockSize>, <&'_ Alg as BlockCipher>::ParBlocks>
)[src]
&self,
blocks: &mut GenericArray<GenericArray<u8, <&'_ Alg as BlockCipher>::BlockSize>, <&'_ Alg as BlockCipher>::ParBlocks>
)
pub fn decrypt_blocks(
&self,
blocks: &mut GenericArray<GenericArray<u8, <&'_ Alg as BlockCipher>::BlockSize>, <&'_ Alg as BlockCipher>::ParBlocks>
)[src]
&self,
blocks: &mut GenericArray<GenericArray<u8, <&'_ Alg as BlockCipher>::BlockSize>, <&'_ Alg as BlockCipher>::ParBlocks>
)
Implementors
impl BlockCipher for Aes128[src]
type BlockSize = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>
type ParBlocks = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>
pub fn encrypt_block(
&self,
block: &mut GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>
)[src]
&self,
block: &mut GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>
)
pub fn decrypt_block(
&self,
block: &mut GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>
)[src]
&self,
block: &mut GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>
)
pub fn encrypt_blocks(
&self,
blocks: &mut GenericArray<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>
)[src]
&self,
blocks: &mut GenericArray<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>
)
pub fn decrypt_blocks(
&self,
blocks: &mut GenericArray<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>
)[src]
&self,
blocks: &mut GenericArray<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>
)
impl BlockCipher for Aes192[src]
type BlockSize = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>
type ParBlocks = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>
pub fn encrypt_block(
&self,
block: &mut GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>
)[src]
&self,
block: &mut GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>
)
pub fn decrypt_block(
&self,
block: &mut GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>
)[src]
&self,
block: &mut GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>
)
pub fn encrypt_blocks(
&self,
blocks: &mut GenericArray<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>
)[src]
&self,
blocks: &mut GenericArray<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>
)
pub fn decrypt_blocks(
&self,
blocks: &mut GenericArray<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>
)[src]
&self,
blocks: &mut GenericArray<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>
)
impl BlockCipher for Aes256[src]
type BlockSize = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>
type ParBlocks = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>
pub fn encrypt_block(
&self,
block: &mut GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>
)[src]
&self,
block: &mut GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>
)
pub fn decrypt_block(
&self,
block: &mut GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>
)[src]
&self,
block: &mut GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>
)
pub fn encrypt_blocks(
&self,
blocks: &mut GenericArray<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>
)[src]
&self,
blocks: &mut GenericArray<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>
)
pub fn decrypt_blocks(
&self,
blocks: &mut GenericArray<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>
)[src]
&self,
blocks: &mut GenericArray<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>>, UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>
)