Enum psa_crypto::types::algorithm::Hash [−][src]
pub enum Hash {
Show 15 variants
Md2,
Md4,
Md5,
Ripemd160,
Sha1,
Sha224,
Sha256,
Sha384,
Sha512,
Sha512_224,
Sha512_256,
Sha3_224,
Sha3_256,
Sha3_384,
Sha3_512,
}
Expand description
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
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
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
Auto Trait Implementations
impl RefUnwindSafe for Hash
impl UnwindSafe for Hash
Blanket Implementations
Mutably borrows from an owned value. Read more