ckb_hash

Function blake2b_256

Source
pub fn blake2b_256<T: AsRef<[u8]>>(s: T) -> [u8; 32]
Expand description

Hashes the slice of binary and returns the digest.

ยงExamples

use ckb_hash::blake2b_256;

let input = b"ckb";
let digest = blake2b_256(&input);
println!("ckbhash({:?}) = {:?}", input, digest);