pub trait Aead {
// Required methods
fn encrypt(
&self,
shared_secret: &[u8],
plaintext: &[u8],
aad: &[u8],
) -> Result<(Vec<u8>, Vec<u8>), EscrowError>;
fn decrypt(
&self,
shared_secret: &[u8],
ciphertext: &[u8],
nonce: &[u8],
aad: &[u8],
) -> Result<Vec<u8>, EscrowError>;
}Expand description
AEAD hook — caller provides concrete AEAD implementation.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".