Trait aead::AeadMut[][src]

pub trait AeadMut: AeadCore {
    fn encrypt<'msg, 'aad>(
        &mut self,
        nonce: &Nonce<Self>,
        plaintext: impl Into<Payload<'msg, 'aad>>
    ) -> Result<Vec<u8>, Error>;
fn decrypt<'msg, 'aad>(
        &mut self,
        nonce: &Nonce<Self>,
        ciphertext: impl Into<Payload<'msg, 'aad>>
    ) -> Result<Vec<u8>, Error>; }
This is supported on crate feature alloc only.

Stateful Authenticated Encryption with Associated Data algorithm.

Required methods

fn encrypt<'msg, 'aad>(
    &mut self,
    nonce: &Nonce<Self>,
    plaintext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
[src]

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).

fn decrypt<'msg, 'aad>(
    &mut self,
    nonce: &Nonce<Self>,
    ciphertext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
[src]

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).

Loading content...

Implementors

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

Loading content...