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.