[][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,
}

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

Implementations

impl Hash[src]

pub fn hash_length(self) -> usize[src]

Get the digest size output by the hash algorithm in bytes

Example

use psa_crypto::types::algorithm::Hash;
assert_eq!(Hash::Sha256.hash_length(), 32);
assert_eq!(Hash::Sha512.hash_length(), 64);

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 SignHash[src]

impl From<Hash> for Algorithm[src]

impl PartialEq<Hash> for Hash[src]

impl Serialize for Hash[src]

impl StructuralPartialEq for Hash[src]

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.