pub enum Aead {
AeadWithDefaultLengthTag(AeadWithDefaultLengthTag),
AeadWithShortenedTag {
aead_alg: AeadWithDefaultLengthTag,
tag_length: usize,
},
}Expand description
Enumeration of authenticated encryption with additional data algorithms supported.
Variants
AeadWithDefaultLengthTag(AeadWithDefaultLengthTag)
AEAD algorithm with a default length tag
AeadWithShortenedTag
Fields
aead_alg: AeadWithDefaultLengthTagAn AEAD algorithm.
tag_length: usizeDesired length of the authentication tag in bytes.
AEAD algorithm with a shortened tag.
Implementations
sourceimpl Aead
impl Aead
sourcepub fn is_aead_on_block_cipher(self) -> bool
pub fn is_aead_on_block_cipher(self) -> bool
Check if the Aead algorithm needs a block cipher
sourcepub fn is_chacha20_poly1305_alg(self) -> bool
pub fn is_chacha20_poly1305_alg(self) -> bool
Check if this AEAD algorithm is the (truncated or not) Chacha20-Poly1305 AEAD algorithm.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Aead
impl<'de> Deserialize<'de> for Aead
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<Aead> for psa_algorithm_t
impl From<Aead> for psa_algorithm_t
sourceimpl From<AeadWithDefaultLengthTag> for Aead
impl From<AeadWithDefaultLengthTag> for Aead
sourcefn from(aead_with_default_tag_length: AeadWithDefaultLengthTag) -> Self
fn from(aead_with_default_tag_length: AeadWithDefaultLengthTag) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<Aead> for Aead
impl PartialEq<Aead> for Aead
impl Copy for Aead
impl Eq for Aead
impl StructuralEq for Aead
impl StructuralPartialEq for Aead
Auto Trait Implementations
impl RefUnwindSafe for Aead
impl Send for Aead
impl Sync for Aead
impl Unpin for Aead
impl UnwindSafe for Aead
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more