pub trait Cipher: Send + Sync {
// Required methods
fn encrypt_page(
&self,
nonce: &[u8; 12],
plaintext: &[u8],
) -> Result<Vec<u8>>;
fn decrypt_page(
&self,
nonce: &[u8; 12],
ciphertext: &[u8],
) -> Result<Vec<u8>>;
}Expand description
Symmetric page cipher.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".