pub trait Cipher: Sync + Send + ZeroizeOnDrop + 'static {
// Required methods
fn encrypt_in_place_detached(
&self,
plaintext: &mut [u8],
associated_data: &[u8]
) -> Result<(Tag, Nonce)>;
fn decrypt(
&self,
nonce: &[u8],
ciphertext: &[u8],
associated_data: &[u8]
) -> Result<Vec<u8>, DecryptError>;
fn key_bytes(&self) -> &[u8] ⓘ;
}