[−][src]Trait crypto_api::cipher::AeadCipher
An AEAD extension for Cipher
Required methods
fn seal(
&self,
buf: &mut [u8],
plaintext_len: usize,
ad: &[u8],
key: &[u8],
nonce: &[u8]
) -> Result<usize, Box<dyn Error + 'static>>
&self,
buf: &mut [u8],
plaintext_len: usize,
ad: &[u8],
key: &[u8],
nonce: &[u8]
) -> Result<usize, Box<dyn Error + 'static>>
AEAD-seals plaintext_len
bytes in-place in buf
together with ad
using key
and
nonce
and returns the ciphertext length
fn seal_to(
&self,
buf: &mut [u8],
plaintext: &[u8],
ad: &[u8],
key: &[u8],
nonce: &[u8]
) -> Result<usize, Box<dyn Error + 'static>>
&self,
buf: &mut [u8],
plaintext: &[u8],
ad: &[u8],
key: &[u8],
nonce: &[u8]
) -> Result<usize, Box<dyn Error + 'static>>
AEAD-seals plaintext
into buf
together with ad
using key
and nonce
and returns the
ciphertext length
fn open(
&self,
buf: &mut [u8],
ciphertext_len: usize,
ad: &[u8],
key: &[u8],
nonce: &[u8]
) -> Result<usize, Box<dyn Error + 'static>>
&self,
buf: &mut [u8],
ciphertext_len: usize,
ad: &[u8],
key: &[u8],
nonce: &[u8]
) -> Result<usize, Box<dyn Error + 'static>>
AEAD-opens ciphertext_len
bytes in-place in buf
together with ad
using key
and
nonce
and returns the plaintext length
fn open_to(
&self,
buf: &mut [u8],
ciphertext: &[u8],
ad: &[u8],
key: &[u8],
nonce: &[u8]
) -> Result<usize, Box<dyn Error + 'static>>
&self,
buf: &mut [u8],
ciphertext: &[u8],
ad: &[u8],
key: &[u8],
nonce: &[u8]
) -> Result<usize, Box<dyn Error + 'static>>
AEAD-opens ciphertext
into buf
together with ad
using key
and nonce
and returns
the plaintext length