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

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

Required Methods§

fn hash(&self) -> HashValue

Hashes the object and produces a HashValue.

Implementors§