def des.picks56
import bend-osdev-legacy-ciphers@0.1.0.0/des.bend as Desimport Base
298# the bits that tab picks from the 56 bits C:D (28 each), appended to acc
299def des.picks56(tab: List<&2, Nat>, +c: U32, +d: U32, acc: U32) -> U32:
300 match tab:
301 case Nil{}:
302 acc
303 case Con{+t, rest}:
304 des.picks56(rest, c, d, U32.or(U32.shl(acc), des.cdbit.pick(Nat.is_lt(28n, t), c, d, t)))