Add canonical hash function
This commit is contained in:
parent
7adc2ddd63
commit
693d635f8c
6
lighthouse/utils/hash.rs
Normal file
6
lighthouse/utils/hash.rs
Normal file
@ -0,0 +1,6 @@
|
||||
use super::blake2::blake2b::blake2b;
|
||||
|
||||
pub fn canonical_hash(input: &[u8]) -> Vec<u8> {
|
||||
let result = blake2b(64, &[], input);
|
||||
result.as_bytes()[0..32].to_vec()
|
||||
}
|
Loading…
Reference in New Issue
Block a user