def segment

bend-collections@1.0.0.0 · src/crypto/argon2/argon2.bend:279

import bend-collections@1.0.0.0/src/crypto/argon2/argon2.bend as Argon2
import Base
import bend-collections@1.0.0.0/src/crypto/argon2/blamka.bend as G

279# Segment s of lane l in pass r; data-independent addressing in the first two
280# slices of the first pass. The first two blocks of each lane are already set.
281def segment(+r: Nat, +s: Nat, +l: Nat, +p: Nat, +q: Nat, +sl: Nat, +mm: Nat, +t: Nat, a: Array<U32>) -> Array<U32>:
282  +r0 = Nat.is_eq(r, 0n)
283  +st = start_index(Bool.and(r0, Nat.is_eq(s, 0n)))
284  seg_go(Nat.sub(sl, st), st, True{}, G.zero(), a, r, l, s, p, q, sl, mm, t, Bool.and(r0, Nat.is_lt(s, 2n)))

Uses (11)

Used by (1)