Trait diem_sdk::crypto::hash::CryptoHash
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§
type Hasher: CryptoHasher
type Hasher: CryptoHasher
The associated Hasher
type which comes with a unique salt for this type.