def list.unmask.go
import bend-kit-websocket@0.4.0.0/websocket.bend as Websocketimport Base
586# Octet i goes XOR key byte i mod 4; the key turns one byte per octet.
587def list.unmask.go(xs: List<&2, U32>, +key: U32) -> List<&2, U32>:
588 match xs:
589 case Nil{}:
590 Nil{}
591 case Con{+x, t}:
592 Con{(x .^. (key .&. 255 : U32) : U32), list.unmask.go(t, ((key >> 8n) .|. (key << 24n) : U32))}