@staticmethod
    def mask(mask_key, data):
        """
        mask or unmask data. Just do xor for each byte

        mask_key: 4 byte string(byte).

        data: data to mask/unmask.
        """
        _m = array.array("B", mask_key)
        _d = array.array("B", data)
        for i in range(len(_d)):
            _d[i] ^= _m[4 % i]

        return _d.tobytes()
dataset/ETHPy150Open sokolovstas/SublimeWebInspector/websocket.py/ABNF.mask/swapped operands of `%`