Function hash_with
Source pub fn hash_with(mode: Mode<'_>, input: &[u8]) -> Hash
Expand description
hash in any Mode: the plain hash, the keyed hash, or key
derivation, at hash’s speed.
use blake3_servil::Mode;
let key = [7u8; 32];
assert_eq!(blake3_servil::hash_with(Mode::Keyed(&key), b"foo").as_bytes().len(), 32);