def sha256
import cswap-bend-cli@0.1.0.0/daemon/freshen.bend as Freshenimport Base
32# Hex sha256 of a text, through shasum(1) with the text on stdin (never argv).
33def sha256(+text: String) -> IO(String):
34 IO.bind(Result<&1, &1, U32 & String, U32 & (String & String)>, String, Process.run("shasum", ["-a", "256"], text, 4096, 5000), r => IO.pure(String, hex_of(r)))