def verify.of
bend-kit-postgres@0.3.0.0 · scram.bend:252
import bend-kit-postgres@0.3.0.0/scram.bend as Scram
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
252def verify.of(+sig: String, r: Result<&1, &1, U32 & String, String>) -> IO(Result<&1, &1, U32 & String, Unit>):
253 match r:
254 case Fail{e}:
255 IO.pure(Result<&1, &1, U32 & String, Unit>, Fail{e})
256 case Done{+got}:
257 do IO<Result<&1, &1, U32 & String, Unit>>:
258 ok : Bool <- eq.of(Bytes.from_string(sig), Bytes.from_string(got))
259 return verify.ok(ok)