def bf.pkey
import bend-osdev-legacy-ciphers@0.1.0.0/blowfish.bend as Blowfishimport Base
import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as L
252# P xored with the key bytes as big-endian words
253def bf.pkey(ps: List<&2, U32>, ks: List<&2, U32>) -> List<&2, U32>:
254 match ps ks:
255 case Con{p, pt} Con{a, Con{b, Con{c, Con{d, kt}}}}:
256 Con{U32.xor(p, L.lc.be(a, b, c, d)), bf.pkey(pt, kt)}
257 case _ _:
258 Nil{}