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 */ }
Expand description
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 toU16
.
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,
impl<Cipher, M> AeadCore for Eax<Cipher, M> where
Cipher: BlockCipher<BlockSize = U16> + BlockEncrypt + NewBlockCipher + Clone,
Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
M: TagSize,
type TagSize = M
type TagSize = M
The maximum length of the nonce.
type CiphertextOverhead = U0
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,
impl<Cipher, M> AeadInPlace for Eax<Cipher, M> where
Cipher: BlockCipher<BlockSize = U16> + BlockEncrypt + NewBlockCipher + Clone,
Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
M: TagSize,
Encrypt the data in-place, returning the authentication tag
Decrypt the message in-place, returning an error in the event the provided authentication tag does not match the given ciphertext (i.e. ciphertext is modified/unauthentic) Read more
Encrypt the given buffer containing a plaintext message in-place. Read more
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,
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,
impl<Cipher, M> NewAead for Eax<Cipher, M> where
Cipher: BlockCipher<BlockSize = U16> + BlockEncrypt + NewBlockCipher + Clone,
Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
M: TagSize,
impl<Cipher, M> NewAead for Eax<Cipher, M> where
Cipher: BlockCipher<BlockSize = U16> + BlockEncrypt + NewBlockCipher + Clone,
Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
M: TagSize,
Create a new AEAD instance with the given key.
Create new AEAD instance from key given as a byte slice.. Read more
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> 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
Encrypt the given plaintext payload, and return the resulting ciphertext as a vector of bytes. Read more
Encrypt the given plaintext slice, and return the resulting ciphertext as a vector of bytes. Read more
Encrypt the given buffer containing a plaintext message in-place. Read more
Encrypt the data in-place, returning the authentication tag
Decrypt the message in-place, returning an error in the event the provided authentication tag does not match the given ciphertext. Read more
Decrypt the data in-place, returning an error in the event the provided authentication tag does not match the given ciphertext (i.e. ciphertext is modified/unauthentic) Read more
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self