pub trait HashFunction:
Default
+ Send
+ Sync
+ 'static {
const NAME: &'static str;
const DIGEST_FELTS: usize;
// Required method
fn hash(input: &[u8]) -> Vec<u8> ⓘ;
}Expand description
The byte-level hash backing a HashPrecompile.
Required Associated Constants§
Sourceconst NAME: &'static str
const NAME: &'static str
Stable name hashed into the precompile id; renaming changes every tag it owns.
Sourceconst DIGEST_FELTS: usize
const DIGEST_FELTS: usize
u32-packed-LE felts in the digest (8 for a 256-bit hash, 16 for 512-bit).
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".