pub enum ChaCha20Poly1305 {}Trait Implementations§
Source§impl Cipher for ChaCha20Poly1305
Available on crate feature use-chacha20poly1305 only.
impl Cipher for ChaCha20Poly1305
Available on crate feature
use-chacha20poly1305 only.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 Freeze for ChaCha20Poly1305
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