Skip to content

sha256

sha256(data) → string · Security

Compute a SHA-256 hash. Returns hex-encoded digest string. See Chapter 38.

  • data (required): string to hash
utlx
sha256("hello")                          // "2cf24dba5fb0a30e..."

// Use case: content-addressed caching
let contentHash = sha256(renderJson($input))
{...$input, hash: contentHash}

Released under AGPL-3.0.