def key_of_seed

bend-collections-laws-math@1.0.0.0 · spec/math/random/chacha8rand.bend:241

import bend-collections-laws-math@1.0.0.0/spec/math/random/chacha8rand.bend as Chacha8rand
import Base

241# the key of a seed: 32 bytes, each below 256
242def key_of_seed(+seed: List<&2, U32>) -> Maybe<&2, List<&2, U32>>:
243  key_if(seed, Bool.and(bytes_ok(seed), Nat.is_eq(length(seed), 32n)))

Uses (8)

Used by (1)