sha256.bzlAPI docs @0.0.1

@sha256.bzl//:sha256.bzl

Functions & Macros

sha256

Compute SHA-256 hash.

Parameters
*input

string with codepoints in 0x00-0xFF, or iterable of ints in 0x00-0xFF.

encoding

"auto" (default) treats strings as raw bytes and iterables as byte lists.
"hex" decodes the input string as hexadecimal (e.g. "0a1b23").

Default: "auto"
output

"hex" for lowercase hex string, "int" for a single integer,
"sri" for SRI format, "byte_list" for list of ints.

Default: "hex"
raw

if True, skip input validation and iterate the input directly as byte values
without ever materializing the full input. The caller must ensure all elements
are ints in 0x00-0xFF.

Default: False