[][src]Struct aes_gcm::AesGcm

pub struct AesGcm<Aes, NonceSize> where
    Aes: BlockCipher<BlockSize = U16>,
    Aes::ParBlocks: ArrayLength<Block<Aes>>,
    NonceSize: ArrayLength<u8>, 
{ /* fields omitted */ }

AES-GCM: generic over an underlying AES implementation and nonce size.

This type is generic to support substituting alternative AES implementations (e.g. embedded hardware implementations)

It is NOT intended to be instantiated with any block cipher besides AES! Doing so runs the risk of unintended cryptographic properties!

The N generic parameter can be used to instantiate AES-GCM with other nonce sizes, however it's recommended to use it with typenum::U12, the default of 96-bits.

If in doubt, use the built-in Aes128Gcm and Aes256Gcm type aliases.

Trait Implementations

impl<Aes, NonceSize> AeadInPlace for AesGcm<Aes, NonceSize> where
    Aes: BlockCipher<BlockSize = U16>,
    Aes::ParBlocks: ArrayLength<Block<Aes>>,
    NonceSize: ArrayLength<u8>, 
[src]

type NonceSize = NonceSize

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<Aes: Clone, NonceSize: Clone> Clone for AesGcm<Aes, NonceSize> where
    Aes: BlockCipher<BlockSize = U16>,
    Aes::ParBlocks: ArrayLength<Block<Aes>>,
    NonceSize: ArrayLength<u8>, 
[src]

impl<Aes, NonceSize> From<Aes> for AesGcm<Aes, NonceSize> where
    Aes: BlockCipher<BlockSize = U16>,
    Aes::ParBlocks: ArrayLength<Block<Aes>>,
    NonceSize: ArrayLength<u8>, 
[src]

impl<Aes, NonceSize> NewAead for AesGcm<Aes, NonceSize> where
    Aes: BlockCipher<BlockSize = U16> + NewBlockCipher,
    Aes::ParBlocks: ArrayLength<Block<Aes>>,
    NonceSize: ArrayLength<u8>, 
[src]

type KeySize = Aes::KeySize

The size of the key array required by this algorithm.

Auto Trait Implementations

impl<Aes, NonceSize> RefUnwindSafe for AesGcm<Aes, NonceSize> where
    Aes: RefUnwindSafe,
    NonceSize: RefUnwindSafe

impl<Aes, NonceSize> Send for AesGcm<Aes, NonceSize> where
    Aes: Send,
    NonceSize: Send

impl<Aes, NonceSize> Sync for AesGcm<Aes, NonceSize> where
    Aes: Sync,
    NonceSize: Sync

impl<Aes, NonceSize> Unpin for AesGcm<Aes, NonceSize> where
    Aes: Unpin,
    NonceSize: Unpin

impl<Aes, NonceSize> UnwindSafe for AesGcm<Aes, NonceSize> where
    Aes: UnwindSafe,
    NonceSize: UnwindSafe

Blanket Implementations

impl<Alg> Aead for Alg where
    Alg: AeadInPlace
[src]

type NonceSize = <Alg as AeadInPlace>::NonceSize

The length of a nonce.

type TagSize = <Alg as AeadInPlace>::TagSize

The maximum length of the nonce.

type CiphertextOverhead = <Alg as AeadInPlace>::CiphertextOverhead

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

impl<Alg> AeadMut for Alg where
    Alg: AeadMutInPlace
[src]

type NonceSize = <Alg as AeadMutInPlace>::NonceSize

The length of a nonce.

type TagSize = <Alg as AeadMutInPlace>::TagSize

The maximum length of the nonce.

type CiphertextOverhead = <Alg as AeadMutInPlace>::CiphertextOverhead

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

impl<Alg> AeadMutInPlace for Alg where
    Alg: AeadInPlace
[src]

type NonceSize = <Alg as AeadInPlace>::NonceSize

The length of a nonce.

type TagSize = <Alg as AeadInPlace>::TagSize

The maximum length of the nonce.

type CiphertextOverhead = <Alg as AeadInPlace>::CiphertextOverhead

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

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.