def cm.xor_bytes

bend-osdev-cipher-modes@0.1.0.0 · cipher_modes.bend:171

import bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend as CipherModes
import Base

171# byte-wise XOR, as long as the shorter list
172def cm.xor_bytes(xs: List<&2, U32>, ys: List<&2, U32>) -> List<&2, U32>:
173  match xs ys:
174    case Con{a, s} Con{b, t}:
175      Con{cm.byte(U32.xor(a, b)), cm.xor_bytes(s, t)}
176    case _ _:
177      Nil{}

Uses (4)

Used by (19)