encryption.py 文件源码

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

项目:Python-GoogleDrive-VideoStream 作者: ddurdle 项目源码 文件源码
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()))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号