def raw
import ezx@1.11.0.0/src/share/sha.bend as Shaimport Base
import 0x3bdc0c9f5265bb49f7fc76b61f529f24/sha256.bend as S
75# the hex sha256 digest of a string whose characters are bytes: each one is
76# reduced to its low eight bits. NAR serials are held this way.
77def raw(+text: String) -> String:
78 match text:
79 case SNil{}:
80 show(S.sha256(bytes(text), 0n))
81 case SCon{_c, _t}:
82 show(S.sha256(bytes(text), String.length(text)))