Trait tendermint::merkle::MerkleHash

source ·
pub trait MerkleHash {
    // Required methods
    fn empty_hash(&mut self) -> Hash;
    fn leaf_hash(&mut self, bytes: &[u8]) -> Hash;
    fn inner_hash(&mut self, left: Hash, right: Hash) -> Hash;

    // Provided method
    fn hash_byte_vectors(&mut self, byte_vecs: &[impl AsRef<[u8]>]) -> Hash { ... }
}
Expand description

Implementation of Merkle tree hashing for Tendermint.

Required Methods§

source

fn empty_hash(&mut self) -> Hash

source

fn leaf_hash(&mut self, bytes: &[u8]) -> Hash

source

fn inner_hash(&mut self, left: Hash, right: Hash) -> Hash

Provided Methods§

source

fn hash_byte_vectors(&mut self, byte_vecs: &[impl AsRef<[u8]>]) -> Hash

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<H> MerkleHash for H
where H: Digest<OutputSize = U32> + FixedOutputReset,

source§

impl<H: Sha256> MerkleHash for NonIncremental<H>