Trait aes_gcm::NewAead [−][src]
pub trait NewAead { type KeySize: ArrayLength<u8>; pub fn new(key: &GenericArray<u8, Self::KeySize>) -> Self; pub fn new_varkey(key: &[u8]) -> Result<Self, Error> { ... } }
Associated Types
type KeySize: ArrayLength<u8>
[src][−]
The size of the key array required by this algorithm.
Required methods
pub fn new(key: &GenericArray<u8, Self::KeySize>) -> Self
[src][−]
Create a new AEAD instance with the given key.
Provided methods
pub fn new_varkey(key: &[u8]) -> Result<Self, Error>
[src][−]
Create new AEAD instance from key with variable size.
Default implementation will accept only keys with length equal to KeySize
.
Implementors
impl<Aes, NonceSize> NewAead for AesGcm<Aes, NonceSize> where
Aes: BlockCipher<BlockSize = U16> + NewBlockCipher,
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]impl NewAead for XChaCha20Poly1305
impl NewAead for XChaCha20Poly1305
impl<C> NewAead for ChaChaPoly1305<C> where
C: NewStreamCipher<KeySize = U32, NonceSize = U12> + SyncStreamCipher + SyncStreamCipherSeek,
impl<C> NewAead for ChaChaPoly1305<C> where
C: NewStreamCipher<KeySize = U32, NonceSize = U12> + SyncStreamCipher + SyncStreamCipherSeek,