diff --git a/lighthouse/utils/hash.rs b/lighthouse/utils/hash.rs new file mode 100644 index 000000000..7b52eb9d1 --- /dev/null +++ b/lighthouse/utils/hash.rs @@ -0,0 +1,6 @@ +use super::blake2::blake2b::blake2b; + +pub fn canonical_hash(input: &[u8]) -> Vec { + let result = blake2b(64, &[], input); + result.as_bytes()[0..32].to_vec() +}