def random

bend-kit-oauth2@0.11.0.1 · oauth2.bend:260

import bend-kit-oauth2@0.11.0.1/oauth2.bend as Oauth2
import Base
import bend-kit-crypto@0.2.2.2/crypto.bend as Crypto

260# n octets from the OS secure random source, as base64url.
261def random(+n: U32) -> IO(Result<&1, &1, Err, String>):
262  do IO<Result<&1, &1, Err, String>>:
263    r : Result<&1, &1, U32 & String, U32 & Array<U32>> <- Crypto.random.words(n)
264    return random.of(r)

Uses (11)

Used by (2)