Python AES-128 CBC加解密方法(兼容其它语言)
发布时间:2020-12-20 10:48:53 所属栏目:Python 来源:网络整理
导读:from Crypto.Cipher import AES import base64 class PrpCrypt(object): def __init__ (self,key): self.key = bytes.fromhex(key) self.mode = AES.MODE_CBC # 这里使用的16个1作为iv,亦可动态生成可变iv self.iv = ‘ 2222222222222221 ‘ .encode( ‘ utf
from Crypto.Cipher import AES import base64 class PrpCrypt(object): def __init__(self,key): self.key = bytes.fromhex(key) self.mode = AES.MODE_CBC |