pub struct ChachaPolyIetf;Expand description
An implementation of the ChachaPoly-IETF AEAD-construction
Implementations§
Source§impl ChachaPolyIetf
impl ChachaPolyIetf
Sourcepub fn cipher() -> Box<dyn Cipher>
pub fn cipher() -> Box<dyn Cipher>
Creates a Cipher instance with ChachaPolyIetf as underlying cipher
Sourcepub fn aead_cipher() -> Box<dyn AeadCipher>
pub fn aead_cipher() -> Box<dyn AeadCipher>
Creates a AeadCipher instance with ChachaPolyIetf as underlying AEAD cipher
Trait Implementations§
Source§impl AeadCipher for ChachaPolyIetf
impl AeadCipher for ChachaPolyIetf
Source§fn seal(
&self,
buf: &mut [u8],
plaintext_len: usize,
ad: &[u8],
key: &[u8],
nonce: &[u8],
) -> Result<usize, Box<dyn Error + 'static>>
fn seal( &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 lengthSource§fn seal_to(
&self,
buf: &mut [u8],
plaintext: &[u8],
ad: &[u8],
key: &[u8],
nonce: &[u8],
) -> Result<usize, Box<dyn Error + 'static>>
fn seal_to( &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 lengthSource§impl Cipher for ChachaPolyIetf
impl Cipher for ChachaPolyIetf
Source§fn info(&self) -> CipherInfo
fn info(&self) -> CipherInfo
Returns information about the cipher
Source§fn encrypted_len_max(&self, plaintext_len: usize) -> usize
fn encrypted_len_max(&self, plaintext_len: usize) -> usize
Predicts the maximum encrypted length for
plaintext_len bytesSource§fn encrypt(
&self,
buf: &mut [u8],
plaintext_len: usize,
key: &[u8],
nonce: &[u8],
) -> Result<usize, Box<dyn Error + 'static>>
fn encrypt( &self, buf: &mut [u8], plaintext_len: usize, key: &[u8], nonce: &[u8], ) -> Result<usize, Box<dyn Error + 'static>>
Encrypts
plaintext_len bytes in-place in buf using key and nonce and returns the
ciphertext lengthSource§fn encrypt_to(
&self,
buf: &mut [u8],
plaintext: &[u8],
key: &[u8],
nonce: &[u8],
) -> Result<usize, Box<dyn Error + 'static>>
fn encrypt_to( &self, buf: &mut [u8], plaintext: &[u8], key: &[u8], nonce: &[u8], ) -> Result<usize, Box<dyn Error + 'static>>
Encrypts
plaintext into buf using key and nonce and returns the ciphertext lengthAuto Trait Implementations§
impl Freeze for ChachaPolyIetf
impl RefUnwindSafe for ChachaPolyIetf
impl Send for ChachaPolyIetf
impl Sync for ChachaPolyIetf
impl Unpin for ChachaPolyIetf
impl UnwindSafe for ChachaPolyIetf
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more