我认为,您需要重置初始化向量( IV ),以获得所需的结果。简便的方法可能是创建一个用于解密的新AES对象:
enc = AES.new(password, mode)encrypted = enc.encrypt(text)print "ORIGINAL: " + textprint "ENCRYPTED: " + str(encrypted)dec = AES.new(password, mode)print "DECRYPTED: " + str(dec.decrypt(encrypted))
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)