Struct chacha20poly1305::ChaChaPoly1305 [−][src]
pub struct ChaChaPoly1305<C, N: ArrayLength<u8> = U12> where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek, { /* fields omitted */ }
Expand description
Generic ChaCha+Poly1305 Authenticated Encryption with Additional Data (AEAD) construction.
See the toplevel documentation for a usage example.
Trait Implementations
impl<C, N> AeadCore for ChaChaPoly1305<C, N> where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
impl<C, N> AeadCore for ChaChaPoly1305<C, N> where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
type NonceSize = N
type NonceSize = N
The length of a nonce.
type TagSize = U16
type TagSize = U16
The maximum length of the nonce.
type CiphertextOverhead = U0
type CiphertextOverhead = U0
The upper bound amount of additional space required to support a ciphertext vs. a plaintext. Read more
impl<C, N> AeadInPlace for ChaChaPoly1305<C, N> where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
impl<C, N> AeadInPlace for ChaChaPoly1305<C, N> where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
Encrypt the data in-place, returning the authentication tag
Decrypt the message in-place, returning an error in the event the provided authentication tag does not match the given ciphertext (i.e. ciphertext is modified/unauthentic) Read more
Encrypt the given buffer containing a plaintext message in-place. Read more
impl<C, N> Clone for ChaChaPoly1305<C, N> where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
impl<C, N> Clone for ChaChaPoly1305<C, N> where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
impl<C, N> Drop for ChaChaPoly1305<C, N> where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
impl<C, N> Drop for ChaChaPoly1305<C, N> where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
impl<C, N> NewAead for ChaChaPoly1305<C, N> where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
impl<C, N> NewAead for ChaChaPoly1305<C, N> where
C: NewCipher<KeySize = U32, NonceSize = N> + StreamCipher + StreamCipherSeek,
N: ArrayLength<u8>,
Auto Trait Implementations
impl<C, N> RefUnwindSafe for ChaChaPoly1305<C, N> where
C: RefUnwindSafe,
impl<C, N> Send for ChaChaPoly1305<C, N> where
C: Send,
impl<C, N> Sync for ChaChaPoly1305<C, N> where
C: Sync,
impl<C, N> Unpin for ChaChaPoly1305<C, N> where
C: Unpin,
impl<C, N> UnwindSafe for ChaChaPoly1305<C, N> where
C: UnwindSafe,
Blanket Implementations
Encrypt the given plaintext payload, and return the resulting ciphertext as a vector of bytes. Read more
Encrypt the given plaintext slice, and return the resulting ciphertext as a vector of bytes. Read more
Encrypt the given buffer containing a plaintext message in-place. Read more
Encrypt the data in-place, returning the authentication tag
Decrypt the message in-place, returning an error in the event the provided authentication tag does not match the given ciphertext. Read more
Decrypt the data in-place, returning an error in the event the provided authentication tag does not match the given ciphertext (i.e. ciphertext is modified/unauthentic) Read more
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self