Trait libp2p::multihash::Multihasher[][src]

pub trait Multihasher<T> where
    T: TryFrom<u64> + Copy
{ pub const CODE: T; pub fn digest(data: &[u8]) -> MultihashGeneric<T>; }

The Multihasher trait specifies an interface common for all multihash functions that does not require allocating a Box<dyn MultihashDigest<T>>.

Associated Constants

pub const CODE: T[src]

The multihash code.

Loading content...

Required methods

pub fn digest(data: &[u8]) -> MultihashGeneric<T>[src]

Hash some input and return the digest.

Loading content...

Implementors

impl Multihasher<Code> for Blake2b256[src]

impl Multihasher<Code> for Blake2b512[src]

impl Multihasher<Code> for Blake2s128[src]

impl Multihasher<Code> for Blake2s256[src]

impl Multihasher<Code> for Identity[src]

impl Multihasher<Code> for Keccak224[src]

impl Multihasher<Code> for Keccak256[src]

impl Multihasher<Code> for Keccak384[src]

impl Multihasher<Code> for Keccak512[src]

impl Multihasher<Code> for Sha1[src]

impl Multihasher<Code> for Sha2_256[src]

impl Multihasher<Code> for Sha2_512[src]

impl Multihasher<Code> for Sha3_224[src]

impl Multihasher<Code> for Sha3_256[src]

impl Multihasher<Code> for Sha3_384[src]

impl Multihasher<Code> for Sha3_512[src]

Loading content...