pub trait AEAD {
const NONCE_SIZE: usize;
const TAG_SIZE: usize;
// Required methods
fn encrypt(
&self,
key: &SecretKey,
nonce: &[u8],
plaintext: &[u8],
associated_data: &[u8],
) -> Result<Vec<u8>>;
fn decrypt(
&self,
key: &SecretKey,
nonce: &[u8],
ciphertext: &[u8],
associated_data: &[u8],
) -> Result<Vec<u8>>;
}Expand description
Trait for AEAD (Authenticated Encryption with Associated Data)
Required Associated Constants§
Required Methods§
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.