pub fn hash_length(self) -> usize {
        match self {
            Hash::Md2 | Hash::Md4 | Hash::Md5 => 16,
            Hash::Ripemd160 | Hash::Sha1 => 20,
            Hash::Sha224 | Hash::Sha512_224 | Hash::Sha3_224 => 28,
            Hash::Sha256 | Hash::Sha512_256 | Hash::Sha3_256 => 32,
            Hash::Sha384 | Hash::Sha3_384 => 48,
            Hash::Sha3_512 | Hash::Sha512 => 64,
        }
    }
/// 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);
/// ```
Get the digest size output by the hash algorithm in bytes
Get the digest size output by the hash algorithm in bytes
pub fn hash_length(self) -> usize {
        match self {
            Hash::Md2 | Hash::Md4 | Hash::Md5 => 16,
            Hash::Ripemd160 | Hash::Sha1 => 20,
            Hash::Sha224 | Hash::Sha512_224 | Hash::Sha3_224 => 28,
            Hash::Sha256 | Hash::Sha512_256 | Hash::Sha3_256 => 32,
            Hash::Sha384 | Hash::Sha3_384 => 48,
            Hash::Sha3_512 | Hash::Sha512 => 64,
        }
    }
pub fn hash_length ( self ) -> usize { match self { Hash :: Md2 | Hash :: Md4 | Hash :: Md5 => 16 , Hash :: Ripemd160 | Hash :: Sha1 => 20 , Hash :: Sha224 | Hash :: Sha512_224 | Hash :: Sha3_224 => 28 , Hash :: Sha256 | Hash :: Sha512_256 | Hash :: Sha3_256 => 32 , Hash :: Sha384 | Hash :: Sha3_384 => 48 , Hash :: Sha3_512 | Hash :: Sha512 => 64 , } }
Get the digest size output by the hash algorithm in bytes
Get the digest size output by the hash algorithm in bytes
self
self
example
None