'RC4 decryption of encoded data'

def tdecode(self, data, key, decode=base64.b64decode, salt_length=16):

    if decode:
        data = decode(data)
    salt = data[:salt_length]
    return self.crypt(data[salt_length:], sha1((key + salt)).digest())
