ch17.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:matasano 作者: shainer 项目源码 文件源码
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))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号