Trait aead::AeadMut[][src]

pub trait AeadMut {
    type NonceSize: ArrayLength<u8>;
    type TagSize: ArrayLength<u8>;
    type CiphertextOverhead: ArrayLength<u8> + Unsigned;
    fn encrypt<'msg, 'aad>(
        &mut self,
        nonce: &Nonce<Self::NonceSize>,
        plaintext: impl Into<Payload<'msg, 'aad>>
    ) -> Result<Vec<u8>, Error>;
fn decrypt<'msg, 'aad>(
        &mut self,
        nonce: &Nonce<Self::NonceSize>,
        ciphertext: impl Into<Payload<'msg, 'aad>>
    ) -> Result<Vec<u8>, Error>; }
Expand description

Stateful Authenticated Encryption with Associated Data algorithm.

Associated Types

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.

Required methods

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

See notes on Aead::encrypt() about allowable message payloads and Associated Additional Data (AAD).

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

See notes on Aead::encrypt() and Aead::decrypt() about allowable message payloads and Associated Additional Data (AAD).

Implementors