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
AEAD algorithm with a shortened tag.
Fields
§
aead_alg: AeadWithDefaultLengthTagAn AEAD algorithm.
Implementations§
Source§impl 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§
Source§impl<'de> Deserialize<'de> for Aead
impl<'de> Deserialize<'de> for Aead
Source§fn 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
Source§impl From<Aead> for psa_algorithm_t
Available on crate feature interface only.
impl From<Aead> for psa_algorithm_t
Available on crate feature
interface only.Source§impl From<AeadWithDefaultLengthTag> for Aead
impl From<AeadWithDefaultLengthTag> for Aead
Source§fn 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.
impl Copy for Aead
impl Eq for Aead
impl StructuralPartialEq for Aead
Auto Trait Implementations§
impl Freeze for Aead
impl RefUnwindSafe for Aead
impl Send for Aead
impl Sync for Aead
impl Unpin for Aead
impl UnsafeUnpin for Aead
impl UnwindSafe for Aead
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more