def Ws.mask

bend-kube-runtime@0.2.0.0 · src/ws.bend:78

import bend-kube-runtime@0.2.0.0/src/ws.bend as Ws
import Base

78# XORs bytes with the key a, b, c, d, rotating.
79def Ws.mask(bs: List<&2, U32>, +a: U32, +b: U32, +c: U32, +d: U32) -> List<&2, U32>:
80  match bs:
81    case Nil{}:
82      Nil{}
83    case Con{x, t}:
84      Con{U32.xor(x, a), Ws.mask(t, b, c, d, a)}

Uses (3)

Used by (1)