[][src]Enum parsec_interface::operations::psa_algorithm::Mac

pub enum Mac {
    FullLength(FullLengthMac),
    Truncated {
        mac_alg: FullLengthMac,
        mac_length: usize,
    },
}

Enumeration of message authentication code algorithms supported.

Variants

FullLength(FullLengthMac)

Untruncated MAC algorithm

Truncated

Truncated MAC algorithm

Fields of Truncated

mac_alg: FullLengthMac

The MAC algorithm to truncate.

mac_length: usize

Desired length of the truncated MAC in bytes.

Implementations

impl Mac[src]

pub fn is_alg_permitted(self, alg: Mac) -> bool[src]

Check if the MAC alg given for a cryptographic operation is permitted to be used with this algorithm as a policy

pub fn is_hmac(self) -> bool[src]

Check if the MAC algorithm is a HMAC algorithm, truncated or not

pub fn is_block_cipher_needed(self) -> bool[src]

Check if the MAC algorithm is a construction over a block cipher

Trait Implementations

impl Clone for Mac[src]

impl Copy for Mac[src]

impl Debug for Mac[src]

impl<'de> Deserialize<'de> for Mac[src]

impl From<Mac> for Algorithm[src]

impl PartialEq<Mac> for Mac[src]

impl Serialize for Mac[src]

impl StructuralPartialEq for Mac[src]

Auto Trait Implementations

impl RefUnwindSafe for Mac

impl Send for Mac

impl Sync for Mac

impl Unpin for Mac

impl UnwindSafe for Mac

Blanket Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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.