java加解密参考:https://www.cnblogs.com/duanxz/p/4385713.html import base64 from Crypto.Hash import MD5 from Crypto.Cipher import DES import hashlib import pyDes def Encrypt(params): pwd = '12345' salt = '12345' count = 100 hasher = MD5.new() hasher.update(pwd.encode()) hasher.update(salt.encode()) result = hasher.digest() for i in range(1, count): hasher = MD5.new() hasher.update(result) result = hasher.digest() des = pyDes.des(result[:8], pyDes.CBC, padmode=pyDes.PAD_PKCS5, IV=result[8:16]) encrypt_data = des.encrypt(params.encode()) return base64.b64encode(encrypt_data) def Decrypt(params): pwd = '12345' salt = '12345' count = 100 decrypt_data = base64.b64decode(params.encode()) hasher = MD5.new() hasher.updat
PBE解密python实现
最新推荐文章于 2024-09-07 16:56:55 发布