pub fn new_blake2b() -> Blake2b
Expand description
Creates a new hasher.
This can be used to hash inputs incrementally.
ยงExamples
use ckb_hash::new_blake2b;
let mut hasher = new_blake2b();
hasher.update(&b"left|"[..]);
hasher.update(&b"right"[..]);
let mut result = [0u8; 32];
hasher.finalize(&mut result); // Saves hash result