pub trait BinaryHash {
// Required method
fn hash(input: &[u8]) -> [u8; 32];
// Provided method
fn hash2_32_concat(left: &[u8; 32], right: &[u8; 32]) -> [u8; 32] { ... }
}Expand description
A simple trait for representing binary hash functions.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl BinaryHash for Blake3BinaryHasher
impl BinaryHash for Sha2BinaryHasher
impl<H: Digest<OutputSize = U32> + Send + Sync> BinaryHash for H
Blanket implementation for all implementations of Digest