def decryptCalculatePadding(self,response, chunksize=24*1024):
if ENCRYPTION_ENABLE == 0:
return
# with open(in_filename, 'rb') as infile:
origsize = struct.unpack('<Q', response.read(struct.calcsize('Q')))[0]
decryptor = AES.new(self.key, AES.MODE_ECB)
count = 0
while True:
chunk = response.read(chunksize)
count = count + 1
if len(chunk) == 0:
break
responseChunk = decryptor.decrypt(chunk)
return int(len(chunk) - len(responseChunk.strip()))
encryption.py 文件源码
python
阅读 34
收藏 0
点赞 0
评论 0
评论列表
文章目录