Trait Digest
trait Digest: OutputSizeUser
Convenience wrapper trait covering functionality of cryptographic hash functions with fixed output size.
This trait wraps Update, FixedOutput, Default, and
HashMarker traits and provides additional convenience methods.
Required Methods
fn new() -> SelfCreate new hasher instance.
fn new_with_prefix<impl AsRef<[u8]>: AsRef<[u8]>>(data: impl AsRef<[u8]>) -> SelfCreate new hasher instance which has processed the provided data.
fn update<impl AsRef<[u8]>: AsRef<[u8]>>(self: &mut Self, data: impl AsRef<[u8]>)Process data, updating the internal state.
fn chain_update<impl AsRef<[u8]>: AsRef<[u8]>>(self: Self, data: impl AsRef<[u8]>) -> SelfProcess input data in a chained manner.
fn finalize(self: Self) -> Output<Self>Retrieve result and consume hasher instance.
fn finalize_into(self: Self, out: &mut Output<Self>)Write result into provided array and consume the hasher instance.
fn finalize_reset(self: &mut Self) -> Output<Self> where Self: FixedOutputResetRetrieve result and reset hasher instance.
fn finalize_into_reset(self: &mut Self, out: &mut Output<Self>) where Self: FixedOutputResetWrite result into provided array and reset the hasher instance.
fn reset(self: &mut Self) where Self: ResetReset hasher instance to its initial state.
fn output_size() -> usizeGet output size of the hasher
fn digest<impl AsRef<[u8]>: AsRef<[u8]>>(data: impl AsRef<[u8]>) -> Output<Self>Compute hash of
data.
Implementors
impl<D> Digest for CoreWrapper<T>impl<D: FixedOutput + Default + Update + HashMarker> Digest for D