def xor_bytes

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/chacha.bend:152

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/chacha.bend as Chacha
import Base

152# Byte-wise XOR of a block with the keystream (as long as the block).
153def xor_bytes(xs: List<&2, U32>, ks: List<&2, U32>) -> List<&2, U32>:
154  match xs ks:
155    case x <> xt k <> kt: U32.xor(x, k) <> xor_bytes(xt, kt)
156    case _ _: Nil{}

Uses (3)

Used by (11)