def challenge.words

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

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
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

274def challenge.words(b: Bytes.Bytes) -> IO(Result<&1, &1, Err, String>):
275  Bytes.Bytes{+len, buf} = b
276  do IO<Result<&1, &1, Err, String>>:
277    r : Result<&1, &1, U32 & String, U32 & Array<U32>> <- Crypto.sha256.words(len, buf)
278    return random.of(r)

Uses (12)

Used by (1)