Trait diem_sdk::crypto::ed25519::ed25519_dalek::Digest [−]
pub trait Digest {
type OutputSize: ArrayLength<u8>;
fn new() -> Self;
fn update(&mut self, data: impl AsRef<[u8]>);
fn chain(self, data: impl AsRef<[u8]>) -> Self;
fn finalize(self) -> GenericArray<u8, Self::OutputSize>;
fn finalize_reset(&mut self) -> GenericArray<u8, Self::OutputSize>;
fn reset(&mut self);
fn output_size() -> usize;
fn digest(data: &[u8]) -> GenericArray<u8, Self::OutputSize>;
}Expand description
Associated Types
type OutputSize: ArrayLength<u8>
type OutputSize: ArrayLength<u8>
Output size for Digest
Required methods
fn new() -> Self
fn new() -> Self
Create new hasher instance
Digest data, updating the internal state.
This method can be called repeatedly for use with streaming messages.
fn finalize(self) -> GenericArray<u8, Self::OutputSize>
fn finalize(self) -> GenericArray<u8, Self::OutputSize>
Retrieve result and consume hasher instance.
fn finalize_reset(&mut self) -> GenericArray<u8, Self::OutputSize>
fn finalize_reset(&mut self) -> GenericArray<u8, Self::OutputSize>
Retrieve result and reset hasher instance.
This method sometimes can be more efficient compared to hasher re-creation.
fn reset(&mut self)
fn reset(&mut self)
Reset hasher instance to its initial state.
fn output_size() -> usize
fn output_size() -> usize
Get output size of the hasher