[−][src]Enum psa_crypto::types::algorithm::Hash
Enumeration of hash algorithms supported.
Variants
The MD2 hash is weak and deprecated and is only recommended for use in legacy protocols.
MD2
The MD4 hash is weak and deprecated and is only recommended for use in legacy protocols.
MD4
The MD5 hash is weak and deprecated and is only recommended for use in legacy protocols.
MD5
RIPEMD-160
The SHA-1 hash is weak and deprecated and is only recommended for use in legacy protocols.
SHA-1
SHA-224
SHA-256
SHA-384
SHA-512
SHA-512/224
SHA-512/256
SHA3-224
SHA3-256
SHA3-384
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl From<Hash> for SignHash[src]
impl From<Hash> for Algorithm[src]
impl From<Hash> for psa_algorithm_t[src]
impl PartialEq<Hash> for Hash[src]
impl Serialize for Hash[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
__S: Serializer,
impl StructuralPartialEq for Hash[src]
impl TryFrom<u32> for Hash[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(alg: psa_algorithm_t) -> Result<Self>[src]
impl Zeroize 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<Z> Zeroize for Z where
Z: DefaultIsZeroes, [src]
Z: DefaultIsZeroes,