def parse.nonce
import bend-kit-postgres@0.3.0.0/scram.bend as Scramimport Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
109def parse.nonce(ok: Bool, +nonce: String, +salt: String, +it: String) -> Result<&1, &1, U32 & String, Parsed>:
110 match ok:
111 case False{}:
112 Fail{(22, "SCRAM server nonce does not extend the client nonce")}
113 case True{}:
114 parse.salt(Bytes.from_base64(salt), nonce, it)