Struct nettle::aead::ChaChaPoly1305
source · pub struct ChaChaPoly1305 { /* private fields */ }
Expand description
D.J. Bernsteins ChaCha-Poly1305 AEAD stream cipher.
Implementations§
source§impl ChaChaPoly1305
impl ChaChaPoly1305
sourcepub const DIGEST_SIZE: usize = 16usize
pub const DIGEST_SIZE: usize = 16usize
Size of a Poly1305 digest in bytes.
sourcepub const NONCE_SIZE: usize = 12usize
pub const NONCE_SIZE: usize = 12usize
Size of the ChaChaPoly1305 nonce in bytes.
sourcepub fn with_key_and_nonce(key: &[u8], nonce: &[u8]) -> Result<Self>
pub fn with_key_and_nonce(key: &[u8], nonce: &[u8]) -> Result<Self>
Creates a new ChaChaPoly1305 instance with secret key
and public nonce
.
Trait Implementations§
source§impl Aead for ChaChaPoly1305
impl Aead for ChaChaPoly1305
source§fn digest_size(&self) -> usize
fn digest_size(&self) -> usize
Length of the digest in bytes.
Auto Trait Implementations§
impl Freeze for ChaChaPoly1305
impl RefUnwindSafe for ChaChaPoly1305
impl Send for ChaChaPoly1305
impl Sync for ChaChaPoly1305
impl Unpin for ChaChaPoly1305
impl UnwindSafe for ChaChaPoly1305
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