Trait Decryption

Source
pub trait Decryption {
    // Required method
    fn decrypt_aead(
        algo: EncryptionAlgorithm,
        key: &[u8],
        iv: Option<&[u8]>,
        aad: &[u8],
        data: &[u8],
        tag: &[u8],
    ) -> Result<Vec<u8>, CoseError>;
}
Expand description

A trait exposing various aead decryption algorithms.

Required Methods§

Source

fn decrypt_aead( algo: EncryptionAlgorithm, key: &[u8], iv: Option<&[u8]>, aad: &[u8], data: &[u8], tag: &[u8], ) -> Result<Vec<u8>, CoseError>

Like decrypt, but for AEAD ciphers such as AES GCM.

Additional Authenticated Data can be provided in the aad field, and the authentication tag should be provided in the tag field.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§