Trait digest::Digest [−][src]
The Digest
trait specifies an interface common for digest functions.
It's a convenience wrapper around Update
, FixedOutput
, Reset
,
Clone
, and Default
traits. It also provides additional convenience methods.
Associated Types
type OutputSize: ArrayLength<u8>
[src]
Output size for Digest
Required methods
fn new() -> Self
[src]
Create new hasher instance
fn update(&mut self, data: impl AsRef<[u8]>)
[src]
Process data, updating the internal state.
fn chain_update(self, data: impl AsRef<[u8]>) -> Self
[src]
Process input data in a chained manner.
fn finalize(self) -> Output<Self>
[src]
Retrieve result and consume hasher instance.
fn finalize_reset(&mut self) -> Output<Self>
[src]
Retrieve result and reset hasher instance.
fn finalize_into(self, out: &mut Output<Self>)
[src]
Write result into provided array and consume the hasher instance.
fn finalize_into_reset(&mut self, out: &mut Output<Self>)
[src]
Write result into provided array and reset the hasher instance.
fn reset(&mut self)
[src]
Reset hasher instance to its initial state.
fn output_size() -> usize
[src]
Get output size of the hasher
fn digest(data: impl AsRef<[u8]>) -> Output<Self>
[src]
Compute hash of data
.