Trait askar_crypto::encrypt::KeyAeadInPlace[][src]

pub trait KeyAeadInPlace {
    fn encrypt_in_place(
        &self,
        buffer: &mut dyn ResizeBuffer,
        nonce: &[u8],
        aad: &[u8]
    ) -> Result<usize, Error>;
fn decrypt_in_place(
        &self,
        buffer: &mut dyn ResizeBuffer,
        nonce: &[u8],
        aad: &[u8]
    ) -> Result<(), Error>;
fn aead_params(&self) -> KeyAeadParams; fn aead_padding(&self, _msg_len: usize) -> usize { ... } }
Expand description

Object-safe trait for key types which perform AEAD encryption

Required methods

Encrypt a secret value in place, appending the verification tag and returning the length of the ciphertext

Decrypt an encrypted (verification tag appended) value in place

Get the nonce and tag length for encryption

Provided methods

Get the ciphertext padding required

Implementors