def pad

bend-collections@1.0.0.0 · spec/crypto/keccak/main.bend:30

import bend-collections@1.0.0.0/spec/crypto/keccak/main.bend as BendCollections
import Base

30def pad(ws: List<&2,U32>, +pos: Nat, +remain: Nat) -> List<&2,U32>:
31  match ws:
32    case Nil{}: Nil{}
33    case w <> rest:
34      last_bit(tail_word(w,pos,remain),Nat.is_eq(pos,132n)) <> pad(rest,Nat.add(pos,4n),remain)

Uses (7)

Used by (1)