def __init__(self):
self.iv = Random.new().read(AES.block_size)
self.key = Random.new().read(AES.block_size)
self.cipher = AES.new(key=self.key, mode=AES.MODE_CBC, IV=self.iv)
texts = []
self.plaintexts = []
# Reads all the lines from the data, as binary strings, then decodes
# them from base64 and applies Pkcs7 padding.
with open('data/7.txt', 'rb') as dataFile:
texts = dataFile.readlines()
for text in texts:
strText = base64.b64decode(text)
self.plaintexts.append(Pkcs7(strText))
评论列表
文章目录