Trait snow::types::Cipher [−][src]
pub trait Cipher {
fn name(&self) -> &'static str;
fn set(&mut self, key: &[u8]);
fn encrypt(
&self,
nonce: u64,
authtext: &[u8],
plaintext: &[u8],
out: &mut [u8]
) -> usize;
fn decrypt(
&self,
nonce: u64,
authtext: &[u8],
ciphertext: &[u8],
out: &mut [u8]
) -> Result<usize, ()>;
}Provides cipher operations
Required Methods
fn name(&self) -> &'static str
fn set(&mut self, key: &[u8])
fn encrypt(
&self,
nonce: u64,
authtext: &[u8],
plaintext: &[u8],
out: &mut [u8]
) -> usize
&self,
nonce: u64,
authtext: &[u8],
plaintext: &[u8],
out: &mut [u8]
) -> usize
fn decrypt(
&self,
nonce: u64,
authtext: &[u8],
ciphertext: &[u8],
out: &mut [u8]
) -> Result<usize, ()>
&self,
nonce: u64,
authtext: &[u8],
ciphertext: &[u8],
out: &mut [u8]
) -> Result<usize, ()>
Implementors
impl Cipher for snow::wrappers::crypto_wrapper::CipherAESGCMimpl Cipher for snow::wrappers::crypto_wrapper::CipherChaChaPolyimpl Cipher for snow::wrappers::hacl_wrapper::CipherChaChaPolyimpl Cipher for snow::wrappers::ring_wrapper::CipherAESGCMimpl Cipher for snow::wrappers::ring_wrapper::CipherChaChaPoly