[][src]Trait eax::NewAead

pub trait NewAead {
    type KeySize: ArrayLength<u8>;
    fn new(key: &GenericArray<u8, Self::KeySize>) -> Self;

    fn new_varkey(key: &[u8]) -> Result<Self, Error> { ... }
}

Instantiate either a stateless Aead or stateful AeadMut algorithm.

Associated Types

type KeySize: ArrayLength<u8>

The size of the key array required by this algorithm.

Loading content...

Required methods

fn new(key: &GenericArray<u8, Self::KeySize>) -> Self

Create a new AEAD instance with the given key.

Loading content...

Provided methods

fn new_varkey(key: &[u8]) -> Result<Self, Error>

Create new AEAD instance from key with variable size.

Default implementation will accept only keys with length equal to KeySize.

Loading content...

Implementors

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

type KeySize = Cipher::KeySize

Loading content...