pub enum ChaCha20Poly1305 {}
Trait Implementations§
source§impl Cipher for ChaCha20Poly1305
impl Cipher for ChaCha20Poly1305
source§fn encrypt(
k: &Self::Key,
nonce: u64,
ad: &[u8],
plaintext: &[u8],
out: &mut [u8]
)
fn encrypt( k: &Self::Key, nonce: u64, ad: &[u8], plaintext: &[u8], out: &mut [u8] )
AEAD encryption. Read more
source§fn encrypt_in_place(
k: &Self::Key,
nonce: u64,
ad: &[u8],
in_out: &mut [u8],
plaintext_len: usize
) -> usize
fn encrypt_in_place( k: &Self::Key, nonce: u64, ad: &[u8], in_out: &mut [u8], plaintext_len: usize ) -> usize
AEAD encryption, but encrypt on one buffer.
return the length of ciphertext. Read more
source§fn decrypt(
k: &Self::Key,
nonce: u64,
ad: &[u8],
ciphertext: &[u8],
out: &mut [u8]
) -> Result<(), ()>
fn decrypt( k: &Self::Key, nonce: u64, ad: &[u8], ciphertext: &[u8], out: &mut [u8] ) -> Result<(), ()>
AEAD decryption. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ChaCha20Poly1305
impl Send for ChaCha20Poly1305
impl Sync for ChaCha20Poly1305
impl Unpin for ChaCha20Poly1305
impl UnwindSafe for ChaCha20Poly1305
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