def blocks

bend-collections-laws-crypto@1.0.0.0 · src/crypto/blake/blake2b/blake2b.bend:281

import bend-collections-laws-crypto@1.0.0.0/src/crypto/blake/blake2b/blake2b.bend as Blake2b
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/blake/blake2b/types.bend as T
import bend-collections-laws-crypto@1.0.0.0/src/crypto/blake/blake2b/compress.bend as F

281def blocks(n: Nat, +index: U32, +remain: Nat, t: T.Counter, pair: Array<U32> & T.Chain) -> T.Chain:
282  match n pair:
283    case 0n Tuple{a,h}: final(a,index,remain,t,h)
284    case 1n+p Tuple{a,h}:
285      +t2 = F.bump(t,128)
286      blocks(p,U32.add(index,32),remain,t2,absorb(a,index,t2,h))

Uses (11)

Used by (5)