Trait diem_crypto::hash::CryptoHash
source · pub trait CryptoHash {
type Hasher: CryptoHasher;
// Required method
fn hash(&self) -> HashValue;
}
Expand description
A type that can be cryptographically hashed to produce a HashValue
.
In most cases, this trait should not be implemented manually but rather derived using
the macros serde::Serialize
, CryptoHasher
, and BCSCryptoHash
.
Required Associated Types§
sourcetype Hasher: CryptoHasher
type Hasher: CryptoHasher
The associated Hasher
type which comes with a unique salt for this type.