Trait jmt::SimpleHasher
source · pub trait SimpleHasher: Sized {
// Required methods
fn new() -> Self;
fn update(&mut self, data: &[u8]);
fn finalize(self) -> [u8; 32];
// Provided method
fn hash(data: impl AsRef<[u8]>) -> [u8; 32] { ... }
}
Expand description
A minimal trait representing a hash function. We implement our own
rather than relying on Digest
for broader compatibility.
Required Methods§
Provided Methods§
Object Safety§
This trait is not object safe.