mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 06:18:31 +00:00
Heavily restructure repo
Separate most modules into crates
This commit is contained in:
8
beacon_chain/utils/hashing/src/lib.rs
Normal file
8
beacon_chain/utils/hashing/src/lib.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
extern crate blake2_rfc;
|
||||
|
||||
use self::blake2_rfc::blake2b::blake2b;
|
||||
|
||||
pub fn canonical_hash(input: &[u8]) -> Vec<u8> {
|
||||
let result = blake2b(64, &[], input);
|
||||
result.as_bytes()[0..32].to_vec()
|
||||
}
|
||||
Reference in New Issue
Block a user