Trait sov_modules_api::Hasher
source · pub trait Hasher: 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.