pub fn blake3_long(data: &[u8], len: usize) -> Vec<u8> โAvailable on (crate features
hash-blake3 or hash-sha2) and crate feature hash-blake3 only.Expand description
Compute a BLAKE3 digest of arbitrary length via the extendable-output function (XOF) mode.
len may be any value, including zero. The output is deterministic in
data โ different inputs produce uncorrelated outputs, identical inputs
produce identical outputs.
For the common 32-byte case prefer blake3() โ it skips the XOF reader
path entirely.
ยงExample
use crypt_io::hash;
let d = hash::blake3_long(b"abc", 64);
assert_eq!(d.len(), 64);