lighthouse-pulse/lighthouse/utils/hash.rs

7 lines
169 B
Rust
Raw Normal View History

2018-09-19 04:45:03 +00:00
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()
}