def sha256

cswap-bend-cli@0.1.0.0 · collect.bend:151

import cswap-bend-cli@0.1.0.0/collect.bend as Collect
import Base

151# Hex sha256 of a text through shasum(1), the text on stdin (never on argv).
152def sha256(+text: String) -> IO(String):
153  IO.bind(Result<&1, &1, U32 & String, U32 & (String & String)>, String, Process.run("shasum", ["-a", "256"], text, 4096, 5000), r => IO.pure(String, sha.of(r)))

Uses (10)

Used by (1)