Struct chacha20poly1305::ChaChaPoly1305 [−][src]
pub struct ChaChaPoly1305<C> where
C: NewCipher<KeySize = U32, NonceSize = U12> + StreamCipher + StreamCipherSeek, { /* fields omitted */ }
Generic ChaCha+Poly1305 Authenticated Encryption with Additional Data (AEAD) construction.
See the toplevel documentation for a usage example.
Trait Implementations
impl<C> AeadCore for ChaChaPoly1305<C> where
C: NewCipher<KeySize = U32, NonceSize = U12> + StreamCipher + StreamCipherSeek,
[src]
impl<C> AeadCore for ChaChaPoly1305<C> where
C: NewCipher<KeySize = U32, NonceSize = U12> + StreamCipher + StreamCipherSeek,
[src]type NonceSize = U12
The length of a nonce.
type TagSize = U16
The maximum length of the nonce.
type CiphertextOverhead = U0
The upper bound amount of additional space required to support a ciphertext vs. a plaintext. Read more
impl<C> AeadInPlace for ChaChaPoly1305<C> where
C: NewCipher<KeySize = U32, NonceSize = U12> + StreamCipher + StreamCipherSeek,
[src]
impl<C> AeadInPlace for ChaChaPoly1305<C> where
C: NewCipher<KeySize = U32, NonceSize = U12> + StreamCipher + StreamCipherSeek,
[src]fn encrypt_in_place_detached(
&self,
nonce: &Nonce,
associated_data: &[u8],
buffer: &mut [u8]
) -> Result<Tag, Error>
[src]
&self,
nonce: &Nonce,
associated_data: &[u8],
buffer: &mut [u8]
) -> Result<Tag, Error>
fn decrypt_in_place_detached(
&self,
nonce: &Nonce,
associated_data: &[u8],
buffer: &mut [u8],
tag: &Tag
) -> Result<(), Error>
[src]
&self,
nonce: &Nonce,
associated_data: &[u8],
buffer: &mut [u8],
tag: &Tag
) -> Result<(), Error>
pub fn encrypt_in_place(
&self,
nonce: &GenericArray<u8, Self::NonceSize>,
associated_data: &[u8],
buffer: &mut dyn Buffer
) -> Result<(), Error>
[src]
&self,
nonce: &GenericArray<u8, Self::NonceSize>,
associated_data: &[u8],
buffer: &mut dyn Buffer
) -> Result<(), Error>
pub fn decrypt_in_place(
&self,
nonce: &GenericArray<u8, Self::NonceSize>,
associated_data: &[u8],
buffer: &mut dyn Buffer
) -> Result<(), Error>
[src]
&self,
nonce: &GenericArray<u8, Self::NonceSize>,
associated_data: &[u8],
buffer: &mut dyn Buffer
) -> Result<(), Error>
impl<C> Clone for ChaChaPoly1305<C> where
C: NewCipher<KeySize = U32, NonceSize = U12> + StreamCipher + StreamCipherSeek,
[src]
impl<C> Clone for ChaChaPoly1305<C> where
C: NewCipher<KeySize = U32, NonceSize = U12> + StreamCipher + StreamCipherSeek,
[src]fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<C> Drop for ChaChaPoly1305<C> where
C: NewCipher<KeySize = U32, NonceSize = U12> + StreamCipher + StreamCipherSeek,
[src]
impl<C> Drop for ChaChaPoly1305<C> where
C: NewCipher<KeySize = U32, NonceSize = U12> + StreamCipher + StreamCipherSeek,
[src]impl<C> NewAead for ChaChaPoly1305<C> where
C: NewCipher<KeySize = U32, NonceSize = U12> + StreamCipher + StreamCipherSeek,
[src]
impl<C> NewAead for ChaChaPoly1305<C> where
C: NewCipher<KeySize = U32, NonceSize = U12> + StreamCipher + StreamCipherSeek,
[src]Auto Trait Implementations
impl<C> RefUnwindSafe for ChaChaPoly1305<C> where
C: RefUnwindSafe,
impl<C> RefUnwindSafe for ChaChaPoly1305<C> where
C: RefUnwindSafe,
impl<C> Send for ChaChaPoly1305<C> where
C: Send,
impl<C> Send for ChaChaPoly1305<C> where
C: Send,
impl<C> Sync for ChaChaPoly1305<C> where
C: Sync,
impl<C> Sync for ChaChaPoly1305<C> where
C: Sync,
impl<C> Unpin for ChaChaPoly1305<C> where
C: Unpin,
impl<C> Unpin for ChaChaPoly1305<C> where
C: Unpin,
impl<C> UnwindSafe for ChaChaPoly1305<C> where
C: UnwindSafe,
impl<C> UnwindSafe for ChaChaPoly1305<C> where
C: UnwindSafe,
Blanket Implementations
impl<Alg> Aead for Alg where
Alg: AeadInPlace,
[src]
impl<Alg> Aead for Alg where
Alg: AeadInPlace,
[src]pub fn encrypt<'msg, 'aad>(
&self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
plaintext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8, Global>, Error>
[src]
&self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
plaintext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8, Global>, Error>
pub fn decrypt<'msg, 'aad>(
&self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
ciphertext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8, Global>, Error>
[src]
&self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
ciphertext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8, Global>, Error>
impl<Alg> AeadMut for Alg where
Alg: AeadMutInPlace,
[src]
impl<Alg> AeadMut for Alg where
Alg: AeadMutInPlace,
[src]pub fn encrypt<'msg, 'aad>(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
plaintext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8, Global>, Error>
[src]
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
plaintext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8, Global>, Error>
pub fn decrypt<'msg, 'aad>(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
ciphertext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8, Global>, Error>
[src]
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
ciphertext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8, Global>, Error>
impl<Alg> AeadMutInPlace for Alg where
Alg: AeadInPlace,
[src]
impl<Alg> AeadMutInPlace for Alg where
Alg: AeadInPlace,
[src]pub fn encrypt_in_place(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut impl Buffer
) -> Result<(), Error>
[src]
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut impl Buffer
) -> Result<(), Error>
pub fn encrypt_in_place_detached(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8]
) -> Result<GenericArray<u8, <Alg as AeadCore>::TagSize>, Error>
[src]
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8]
) -> Result<GenericArray<u8, <Alg as AeadCore>::TagSize>, Error>
pub fn decrypt_in_place(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut impl Buffer
) -> Result<(), Error>
[src]
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut impl Buffer
) -> Result<(), Error>
pub fn decrypt_in_place_detached(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8],
tag: &GenericArray<u8, <Alg as AeadCore>::TagSize>
) -> Result<(), Error>
[src]
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8],
tag: &GenericArray<u8, <Alg as AeadCore>::TagSize>
) -> Result<(), Error>
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self