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 to U16.

Trait Implementations

The length of a nonce.

The maximum length of the nonce.

The upper bound amount of additional space required to support a ciphertext vs. a plaintext. 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 (i.e. ciphertext is modified/unauthentic) Read more

Encrypt the given buffer containing a plaintext message in-place. Read more

Decrypt the message in-place, returning an error in the event the provided authentication tag does not match the given ciphertext. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The size of the key array required by this algorithm.

Create a new AEAD instance with the given key.

Create new AEAD instance from key given as a byte slice.. Read more

Generate a random key for this AEAD using the provided CryptoRng.

Auto Trait Implementations

Blanket Implementations

Encrypt the given plaintext payload, and return the resulting ciphertext as a vector of bytes. Read more

Decrypt the given ciphertext slice, and return the resulting plaintext as a vector of bytes. Read more

Encrypt the given plaintext slice, and return the resulting ciphertext as a vector of bytes. Read more

Decrypt the given ciphertext slice, and return the resulting plaintext 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

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.