@tola/hash

Compute BLAKE3 digests and encode bytes as lowercase hexadecimal strings.

Import

typst
#import "@tola/hash:0.0.0": *

Exports

blake3

typc
let blake3(
  value: bytes,
) = bytes;

Return the 32-byte BLAKE3 digest of value.

Positional parameters

  • value bytes required: Input bytes to hash. Convert strings with bytes(text) first.

Hash a string and format it as hex

typst
#import "@tola/hash:0.0.0": blake3, bytes-to-hex

#let digest = bytes-to-hex(blake3(bytes("hello")))

bytes-to-hex

typc
let bytes-to-hex(
  value: bytes,
) = str;

Encode value as lowercase hexadecimal text (two characters per byte).

Positional parameters

  • value bytes required: Bytes to encode.

Search this site

Use the arrow keys to move through results.

Type to search.