[][src]Struct aes_gcm_siv::AesGcmSiv

pub struct AesGcmSiv<B> where
    B: BlockCipher<BlockSize = U16>,
    B::ParBlocks: ArrayLength<GenericArray<u8, B::BlockSize>>, 
{ /* fields omitted */ }

AES-GCM-SIV: Misuse-Resistant Authenticated Encryption Cipher (RFC 8452)

Trait Implementations

impl<B> Aead for AesGcmSiv<B> where
    B: BlockCipher<BlockSize = U16>,
    B::ParBlocks: ArrayLength<GenericArray<u8, B::BlockSize>>, 
[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<B: Clone> Clone for AesGcmSiv<B> where
    B: BlockCipher<BlockSize = U16>,
    B::ParBlocks: ArrayLength<GenericArray<u8, B::BlockSize>>, 
[src]

impl<B> From<B> for AesGcmSiv<B> where
    B: BlockCipher<BlockSize = U16>,
    B::ParBlocks: ArrayLength<GenericArray<u8, B::BlockSize>>, 
[src]

impl<B> NewAead for AesGcmSiv<B> where
    B: BlockCipher<BlockSize = U16>,
    B::ParBlocks: ArrayLength<GenericArray<u8, B::BlockSize>>, 
[src]

type KeySize = B::KeySize

The size of the key array required by this algorithm.

Auto Trait Implementations

impl<B> Send for AesGcmSiv<B> where
    B: Send

impl<B> Sync for AesGcmSiv<B> where
    B: Sync

impl<B> Unpin for AesGcmSiv<B> where
    B: Unpin

Blanket Implementations

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>(
    &mut self,
    nonce: &GenericArray<u8, <Algo as AeadMut>::NonceSize>,
    plaintext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
[src]

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

fn encrypt_in_place(
    &mut self,
    nonce: &GenericArray<u8, <Algo as AeadMut>::NonceSize>,
    associated_data: &[u8],
    buffer: &mut impl Buffer
) -> Result<(), Error>
[src]

Encrypt the given buffer containing a plaintext message in-place.

fn encrypt_in_place_detached(
    &mut self,
    nonce: &GenericArray<u8, <Algo as AeadMut>::NonceSize>,
    associated_data: &[u8],
    buffer: &mut [u8]
) -> Result<GenericArray<u8, <Algo as AeadMut>::TagSize>, Error>
[src]

Encrypt the data in-place, returning the authentication tag

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

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

fn decrypt_in_place(
    &mut self,
    nonce: &GenericArray<u8, <Algo as AeadMut>::NonceSize>,
    associated_data: &[u8],
    buffer: &mut impl Buffer
) -> Result<(), Error>
[src]

Decrypt the message in-place, returning an error in the event the provided authentication tag does not match the given ciphertext.

fn decrypt_in_place_detached(
    &mut self,
    nonce: &GenericArray<u8, <Algo as AeadMut>::NonceSize>,
    associated_data: &[u8],
    buffer: &mut [u8],
    tag: &GenericArray<u8, <Algo as AeadMut>::TagSize>
) -> Result<(), Error>
[src]

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)

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

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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> 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.