[][src]Struct chacha20poly1305::ChaCha20Poly1305

pub struct ChaCha20Poly1305 { /* fields omitted */ }

ChaCha20Poly1305 Authenticated Encryption with Additional Data (AEAD)

Trait Implementations

impl Drop for ChaCha20Poly1305[src]

impl Clone for ChaCha20Poly1305[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl NewAead for ChaCha20Poly1305[src]

type KeySize = U32

The size of the key array required by this algorithm.

impl Aead for ChaCha20Poly1305[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

Auto Trait Implementations

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<Algo> AeadMut for Algo where
    Algo: Aead
[src]

type NonceSize = <Algo as Aead>::NonceSize

The length of a nonce.

type TagSize = <Algo as Aead>::TagSize

The maximum length of the nonce.

type CiphertextOverhead = <Algo as Aead>::CiphertextOverhead

The upper bound amount of additional space required to support a ciphertext vs. a plaintext. Read more

fn encrypt<'msg, 'aad, impl Into>>(
    &mut self,
    nonce: &GenericArray<u8, <Algo as AeadMut>::NonceSize>,
    plaintext: impl Into>
) -> Result<Vec<u8>, Error> where
    impl Into>: Into<Payload<'msg, 'aad>>, 
[src]

Encrypt the given plaintext slice, and return the resulting ciphertext as a vector of bytes.

fn decrypt<'msg, 'aad, impl Into>>(
    &mut self,
    nonce: &GenericArray<u8, <Algo as AeadMut>::NonceSize>,
    ciphertext: impl Into>
) -> Result<Vec<u8>, Error> where
    impl Into>: Into<Payload<'msg, 'aad>>, 
[src]

Decrypt the given ciphertext slice, and return the resulting plaintext as a vector of bytes.

impl<T> Same<T> for T

type Output = T

Should always be Self