(self, data)
return masked
Performs the masking or unmasking operation on data
        using the simple masking algorithm:

        ..
           j                   = i MOD 4
           transformed-octet-i = original-octet-i XOR masking-key-octet-j
Performs the masking or unmasking operation on data
        using the simple masking algorithm:
Performs the masking or unmasking operation on data using the simple masking algorithm :
def mask(self, data):
        """
        Performs the masking or unmasking operation on data
        using the simple masking algorithm:

        ..
           j                   = i MOD 4
           transformed-octet-i = original-octet-i XOR masking-key-octet-j

        """
        masked = bytearray(data)
        if py3k: key = self.masking_key
        else: key = map(ord, self.masking_key)
        for i in range(len(data)):
            masked[i] = masked[i] ^ key[i%4]
        return masked
def mask ( self , data ) : masked = bytearray ( data ) if py3k : key = self . masking_key else : key = map ( ord , self . masking_key ) for i in range ( len ( data ) ) : masked [ i ] = masked [ i ] ^ key [ i % 4 ] return masked