Blake2s.blocks: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2s.bend as Blake2s Lines 186-193 of bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2s.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2s.bend&start_line=186&end_line=193 import Base import bend-collections-laws-crypto@1.0.0.0/src/crypto/blake/blake2s/types.bend as T # n full blocks, then the last one; t counts the bytes compressed so far. def blocks(+r: Nat, n: Nat, +base: U32, +t0: U32, t1: U32, +remain: Nat, pair: Array & T.State) -> T.State: match n pair: case 0n Tuple{a, h}: finish(r, a, base, t0, t1, remain, h) case 1n+p Tuple{a, h}: +c0 = U32.add(t0, 64) +c1 = count_hi(t0, t1, 64) blocks(r, p, U32.add(base, 16), c0, c1, remain, absorb(r, a, base, h, c0, c1)) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2s.bend&name=absorb https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2s.bend&name=count_hi https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2s.bend&name=finish https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/blake/blake2s/types.bend&name=State