Trait multihash::MultihashDigest [−][src]
The MultihashDigest
trait specifies an interface common for all multihash functions.
Required methods
fn code(&self) -> T
[src]
The Mutlihash byte value.
fn digest(&self, data: &[u8]) -> MultihashGeneric<T>
[src]
Hash some input and return the digest.
Panics
Panics if the digest length is bigger than 2^32. This only happens for identity hasing.
fn input(&mut self, data: &[u8])
[src]
Digest data, updating the internal state.
This method can be called repeatedly for use with streaming messages.
Panics
Panics if the digest length is bigger than 2^32. This only happens for identity hashing.
fn result(self) -> MultihashGeneric<T>
[src]
Retrieve the computed MultihashGeneric
, consuming the hasher.
fn result_reset(&mut self) -> MultihashGeneric<T>
[src]
Retrieve result and reset hasher instance.
This method sometimes can be more efficient compared to hasher re-creation.
fn reset(&mut self)
[src]
Reset hasher instance to its initial state.