@tola/hash
Compute BLAKE3 digests and encode bytes as lowercase hexadecimal strings.
Import
#import "@tola/hash:0.0.0": *Exports
blake3
let blake3(
value: bytes,
) = bytes;Return the 32-byte BLAKE3 digest of value.
Positional parameters
valuebytesrequired: Input bytes to hash. Convert strings withbytes(text)first.
Hash a string and format it as hex
#import "@tola/hash:0.0.0": blake3, bytes-to-hex
#let digest = bytes-to-hex(blake3(bytes("hello")))bytes-to-hex
let bytes-to-hex(
value: bytes,
) = str;Encode value as lowercase hexadecimal text (two characters per byte).
Positional parameters
valuebytesrequired: Bytes to encode.