def parse.salt
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
101def parse.salt(m: Maybe<&1, Bytes.Bytes>, +nonce: String, +it: String) -> Result<&1, &1, U32 & String, Parsed>:
102 match m:
103 case None{}:
104 Fail{(22, "SCRAM salt is not base64")}
105 case Some{b}:
106 +salt = Bytes.to_string(b)
107 parse.salt.of(String.is_empty(salt), nonce, salt, it)