def hex

ezx@1.11.0.0 · src/share/sha.bend:139

import ezx@1.11.0.0/src/share/sha.bend as Sha
import Base

139# the hex sha256 digest of a text's UTF-8 bytes, which is what `sha256sum`
140# says of the file the text was read from, and what `bend --publish` and the
141# hub hash a package file and its manifest by. The match is what a symbolic
142# string sticks on, so a proof that only unfolds `hash_of` does not enter
143# the digest.
144def hex(+text: String) -> String:
145  match text:
146    case SNil{}:
147      raw(text)
148    case SCon{_c, _t}:
149      raw(utf8(text))

Uses (3)

Used by (11)