def cm.diff

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

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

244def cm.diff(xs: List<&2, U32>, ys: List<&2, U32>, acc: U32) -> U32:
245  match xs ys:
246    case Con{a, s} Con{b, t}:
247      cm.diff(s, t, U32.or(acc, cm.byte(U32.xor(a, b))))
248    case Nil{} Nil{}:
249      acc
250    case _ _:
251      1

Uses (5)

Used by (3)