def first

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

import bend-kit-postgres@0.3.0.0/scram.bend as Scram
import Base
import bend-kit-crypto@0.2.2.1/crypto.bend as Crypto

52# A fresh 18-octet nonce from the OS secure random source, base64 (24 printable chars, no ',').
53def first(+user: String) -> IO(Result<&1, &1, U32 & String, First & String>):
54  do IO<Result<&1, &1, U32 & String, First & String>>:
55    r : Result<&1, &1, U32 & String, U32 & Array<U32>> <- Crypto.random.words(18)
56    return first.of(user, r)

Uses (11)

Used by (1)