def parse.salt

bend-kit-postgres@0.3.0.0 · scram.bend:101

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

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)

Uses (11)

Used by (1)