Skip to main content

Module digest

Module digest 

Source
Expand description

Cryptographic digest builtins (SHA-256, SHA-512, BLAKE3, CRC32).

Provides digest(x, algo) for hashing character strings, md5(x) as an error stub directing users to SHA-256, and BLAKE3 builtins for fast hashing of strings, raw vectors, and files. CRC32 is available via digest(x, algo="crc32") using the crc32fast crate.

StaticsΒ§

__BUILTIN_REG_BUILTIN_BASE64DEC πŸ”’
__BUILTIN_REG_BUILTIN_BASE64ENC πŸ”’
__BUILTIN_REG_BUILTIN_BLAKE3 πŸ”’
__BUILTIN_REG_BUILTIN_BLAKE3_FILE πŸ”’
__BUILTIN_REG_BUILTIN_BLAKE3_RAW πŸ”’
__BUILTIN_REG_BUILTIN_DIGEST πŸ”’
__BUILTIN_REG_BUILTIN_MD5 πŸ”’

FunctionsΒ§

builtin_base64dec πŸ”’
Decode a base64-encoded string to a character string.
builtin_base64enc πŸ”’
Encode a character string or raw vector to base64.
builtin_blake3 πŸ”’
Compute a BLAKE3 hash of a character string or raw vector.
builtin_blake3_file πŸ”’
Compute a BLAKE3 hash of a file’s contents using streaming I/O.
builtin_blake3_raw πŸ”’
Compute a BLAKE3 hash and return as a 32-byte raw vector.
builtin_digest πŸ”’
Compute a hash of a character string.
builtin_md5 πŸ”’
MD5 is deprecated β€” error stub suggesting SHA-256.
extract_input_bytes πŸ”’
Extract a character or raw input from the first argument.