def get

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/argon2/argon2.bend:201

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/argon2.bend as Argon2
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as C
import bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/types.bend as A
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/blamka.bend as G

201# B[i][j] of the memory is element i * q + j; a block out of range reads as zero.
202def get(mem: List<&2, A.Block>, +b: Nat) -> A.Block:
203  Maybe.default(&2, A.Block, C.nth(A.Block, mem, b), G.zero())

Uses (6)

Used by (17)