pub trait EncryptOperation<'a, C: SymmetricCipher>: Operation<C::Ciphertext> {
// Required methods
fn with_nonce(self, nonce: &'a C::Nonce) -> Self;
fn with_aad(self, aad: &'a [u8]) -> Self;
fn encrypt(self, plaintext: &'a [u8]) -> Result<C::Ciphertext>;
}Expand description
Base trait for encryption operations
Required Methods§
Sourcefn with_nonce(self, nonce: &'a C::Nonce) -> Self
fn with_nonce(self, nonce: &'a C::Nonce) -> Self
Set the nonce for encryption
Sourcefn encrypt(self, plaintext: &'a [u8]) -> Result<C::Ciphertext>
fn encrypt(self, plaintext: &'a [u8]) -> Result<C::Ciphertext>
Set plaintext and execute encryption
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".