Trait aes::BlockCipher[][src]

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

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

Loading content...

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

Loading content...

Provided methods

pub fn encrypt_blocks(
    &self,
    blocks: &mut GenericArray<GenericArray<u8, Self::BlockSize>, Self::ParBlocks>
)
[src]

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]

Decrypt several blocks in parallel using instruction level parallelism if possible.

If ParBlocks equals to 1 it’s equivalent to decrypt_block.

Loading content...

Implementations on Foreign Types

impl<'_, Alg> BlockCipher for &'_ Alg where
    Alg: BlockCipher
[src]

type BlockSize = <Alg as BlockCipher>::BlockSize

type ParBlocks = <Alg as BlockCipher>::ParBlocks

Loading content...

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>

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>

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>

Loading content...