def xor_pad
import bend-collections@1.0.0.0/spec/crypto/hmac.bend as Hmacimport Base
46# Byte-wise exclusive or of K0 with a pad byte (steps 4 and 7).
47def xor_pad(ks: List<&2, U32>, +pad: U32) -> List<&2, U32>:
48 match ks:
49 case Nil{}:
50 Nil{}
51 case k <> rest:
52 U32.xor(k, pad) <> xor_pad(rest, pad)