Example #1
0
def decrypt(message, secret_key):
    cipher = DES.new(secret_key)
    return urllib.unquote(des_unpadding(cipher.decrypt(base64.b64decode(urllib.unquote(message)).decode('hex'))))
Example #2
0
def decrypt(content, secret_key):
    content = content.encode('utf-8')
    cipher = DES.new(secret_key)
    return des_unpadding(cipher.decrypt(base64.b64decode(content).decode('hex')))