Struct eax::Eax[][src]

pub struct Eax<Cipher, M = U16> where
    Cipher: BlockCipher<BlockSize = U16> + BlockEncrypt + NewBlockCipher + Clone,
    Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
    M: TagSize, 
{ /* fields omitted */ }

EAX: generic over an underlying block cipher implementation.

This type is generic to support substituting alternative cipher implementations.

If in doubt, use the built-in [Aes128Eax] and [Aes256Eax] type aliases.

Type parameters:

  • Cipher: block cipher.
  • M: size of MAC tag, valid values: up to U16.

Trait Implementations

impl<Cipher, M> AeadCore for Eax<Cipher, M> where
    Cipher: BlockCipher<BlockSize = U16> + BlockEncrypt + NewBlockCipher + Clone,
    Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
    M: TagSize, 
[src]

type NonceSize = Cipher::BlockSize

The length of a nonce.

type TagSize = M

The maximum length of the nonce.

type CiphertextOverhead = U0

The upper bound amount of additional space required to support a ciphertext vs. a plaintext. Read more

impl<Cipher, M> AeadInPlace for Eax<Cipher, M> where
    Cipher: BlockCipher<BlockSize = U16> + BlockEncrypt + NewBlockCipher + Clone,
    Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
    M: TagSize, 
[src]

impl<Cipher: Clone, M: Clone> Clone for Eax<Cipher, M> where
    Cipher: BlockCipher<BlockSize = U16> + BlockEncrypt + NewBlockCipher + Clone,
    Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
    M: TagSize, 
[src]

impl<Cipher, M> NewAead for Eax<Cipher, M> where
    Cipher: BlockCipher<BlockSize = U16> + BlockEncrypt + NewBlockCipher + Clone,
    Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
    M: TagSize, 
[src]

type KeySize = Cipher::KeySize

The size of the key array required by this algorithm.

Auto Trait Implementations

impl<Cipher, M> RefUnwindSafe for Eax<Cipher, M> where
    M: RefUnwindSafe,
    <<Cipher as NewBlockCipher>::KeySize as ArrayLength<u8>>::ArrayType: RefUnwindSafe

impl<Cipher, M> Send for Eax<Cipher, M> where
    M: Send

impl<Cipher, M> Sync for Eax<Cipher, M> where
    M: Sync

impl<Cipher, M> Unpin for Eax<Cipher, M> where
    M: Unpin,
    <<Cipher as NewBlockCipher>::KeySize as ArrayLength<u8>>::ArrayType: Unpin

impl<Cipher, M> UnwindSafe for Eax<Cipher, M> where
    M: UnwindSafe,
    <<Cipher as NewBlockCipher>::KeySize as ArrayLength<u8>>::ArrayType: UnwindSafe

Blanket Implementations

impl<Alg> Aead for Alg where
    Alg: AeadInPlace
[src]

impl<Alg> AeadMut for Alg where
    Alg: AeadMutInPlace
[src]

impl<Alg> AeadMutInPlace for Alg where
    Alg: AeadInPlace
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.