pub trait KeyAeadMeta {
type NonceSize: ArrayLength<u8>;
type TagSize: ArrayLength<u8>;
// Provided method
fn random_nonce() -> GenericArray<u8, Self::NonceSize> { ... }
}Expand description
For concrete key types with fixed nonce and tag sizes
Required Associated Types§
Sourcetype NonceSize: ArrayLength<u8>
type NonceSize: ArrayLength<u8>
The size of the AEAD nonce
Sourcetype TagSize: ArrayLength<u8>
type TagSize: ArrayLength<u8>
The size of the AEAD tag
Provided Methods§
Sourcefn random_nonce() -> GenericArray<u8, Self::NonceSize>
Available on crate feature getrandom only.
fn random_nonce() -> GenericArray<u8, Self::NonceSize>
getrandom only.Generate a new random nonce
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl<C> KeyAeadMeta for AesKey<AesKeyWrap<C>>where
AesKeyWrap<C>: AesType,
Available on crate feature aes only.
impl<C> KeyAeadMeta for AesKey<AesKeyWrap<C>>where
AesKeyWrap<C>: AesType,
Available on crate feature
aes only.Source§impl<C, D> KeyAeadMeta for AesKey<AesCbcHmac<C, D>>
Available on crate feature aes only.
impl<C, D> KeyAeadMeta for AesKey<AesCbcHmac<C, D>>
Available on crate feature
aes only.type NonceSize = <C as BlockSizeUser>::BlockSize
type TagSize = <C as KeySizeUser>::KeySize
Source§impl<T: Chacha20Type> KeyAeadMeta for Chacha20Key<T>
Available on crate feature chacha only.
impl<T: Chacha20Type> KeyAeadMeta for Chacha20Key<T>
Available on crate feature
chacha only.