pub trait HashAlgorithm {
// Required methods
fn id(&self) -> HashAlgId;
fn hash(&self, data: &[u8]) -> Hash;
fn hash_prefixed(&self, prefix: &[u8], data: &[u8]) -> Hash;
}
Expand description
A hashing algorithm.
Required Methods§
sourcefn hash_prefixed(&self, prefix: &[u8], data: &[u8]) -> Hash
fn hash_prefixed(&self, prefix: &[u8], data: &[u8]) -> Hash
Computes the hash of the provided data with a prefix.