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

pub enum Hash {
    Md2,
    Md4,
    Md5,
    Ripemd160,
    Sha1,
    Sha224,
    Sha256,
    Sha384,
    Sha512,
    Sha512_224,
    Sha512_256,
    Sha3_224,
    Sha3_256,
    Sha3_384,
    Sha3_512,
    Any,
}

Enumeration of hash algorithms supported.

Variants

Md2
👎 Deprecated:

The MD2 hash is weak and deprecated and is only recommended for use in legacy protocols.

MD2

Md4
👎 Deprecated:

The MD4 hash is weak and deprecated and is only recommended for use in legacy protocols.

MD4

Md5
👎 Deprecated:

The MD5 hash is weak and deprecated and is only recommended for use in legacy protocols.

MD5

Ripemd160

RIPEMD-160

Sha1
👎 Deprecated:

The SHA-1 hash is weak and deprecated and is only recommended for use in legacy protocols.

SHA-1

Sha224

SHA-224

Sha256

SHA-256

Sha384

SHA-384

Sha512

SHA-512

Sha512_224

SHA-512/224

Sha512_256

SHA-512/256

Sha3_224

SHA3-224

Sha3_256

SHA3-256

Sha3_384

SHA3-384

Sha3_512

SHA3-512

Any

In a hash-and-sign algorithm policy, allow any hash algorithm. This value must not be used to build an algorithm specification to perform an operation. It is only valid to build policies.

Implementations

impl Hash[src]

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

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

pub fn digest_size(self) -> Option<usize>[src]

Get the digest size output by the hash algorithm

Returns None for Hash::Any

Trait Implementations

impl Clone for Hash[src]

impl Copy for Hash[src]

impl Debug for Hash[src]

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

impl From<Hash> for Algorithm[src]

impl PartialEq<Hash> for Hash[src]

impl Serialize for Hash[src]

impl StructuralPartialEq for Hash[src]

impl TryFrom<i32> for Hash[src]

type Error = ResponseStatus

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Hash

impl Send for Hash

impl Sync for Hash

impl Unpin for Hash

impl UnwindSafe for Hash

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.