Trait diem_crypto::hash::CryptoHash[][src]

pub trait CryptoHash {
    type Hasher: CryptoHasher;
    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.

Associated Types

The associated Hasher type which comes with a unique salt for this type.

Required methods

Hashes the object and produces a HashValue.

Implementors