def finish
import bend-collections@1.0.0.0/src/crypto/blake/blake2s/blake2s.bend as Blake2simport Base
import bend-collections@1.0.0.0/src/crypto/blake/blake2s/types.bend as T
159def finish(a: Array<U32>, +index: U32, +t0: U32, t1: U32, +remain: Nat, h: T.State) -> T.State:
160 +n = U32.from_nat(remain)
161 pad0(remain,index,h,U32.add(t0,n),count_hi(t0,t1,n),Array.get(U32,a,index))