// Generates a hash of data prefixed with `prefix`
Generates a hash of data prefixed with `prefix`
Generates a hash of data prefixed with ` prefix `
fn prefixed_hash(prefix: u8, data: &[u8]) -> Box<[u8; 32]> {
    let mut hasher = VarBlake2b::new(32).unwrap();
    hasher.update(&[prefix]);
    hasher.update(data);
    let hash = hasher.finalize_boxed();
    hash.try_into().unwrap()
}
fn prefixed_hash ( prefix : u8 , data : & [ u8 ] ) -> Box < [ u8 ; 32 ] > { let mut hasher = VarBlake2b :: new ( 32 ) . unwrap ( ) ; hasher . update ( & [ prefix ] ) ; hasher . update ( data ) ; let hash = hasher . finalize_boxed ( ) ; hash . try_into ( ) . unwrap ( ) }
Generates a hash of data prefixed with `prefix`
Generates a hash of data prefixed with ` prefix `
prefix
u8
data
&[u8]