Source/Packages

Data.SHA256Digest

packages/foundation/standard/src/Data/SHA256Digest.alpha

1,631 lines150 declarations64.2 KiBSHA-256 c46a79f2ab9a

def · lines 1512–1523

sha256DigestIdentityFromHex

Full file
Text is admitted exactly once: parsing rejects non-canonical spellings, then sha256DigestIdentity re-renders the checked binary value. The result therefore cannot contain a 64-byte string that merely looks digest-like.
1512def sha256DigestIdentityFromHex =
1513  (lambda unrestricted input : Bytes .
1514    (eliminate
1515      SHA256Result
1516      (lambda unrestricted current : (family SHA256Result) . (family SHA256DigestIdentityResult))
1517      (sha256DigestFromHex input)
1518      (branch SHA256Succeeded digest . (sha256DigestIdentity digest))
1519      (branch
1520        SHA256Failed
1521        error
1522        .
1523        (constructor SHA256DigestIdentityResult SHA256DigestIdentityFailed error))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.