lighthouse-pulse/lighthouse/utils/hash.rs
2018-09-19 14:45:03 +10:00

7 lines
169 B
Rust

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()
}