encryption_support.py 文件源码

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

项目:mass-apk-installer 作者: binary-signal 项目源码 文件源码
def __init__(self, key_aes):
        if key_aes==None: # if key_aes is empty generate random key 16 byte / 128 bit in length for the AES cipher key
            self.key_aes = Random.get_random_bytes(16)
            self.dump_aes_key(self.key_aes)
        if key_aes != None:
            self.key_aes =self.hash_sha256(key_aes)
            if len(self.hash_sha256(key_aes)) != self.block_size:
                print "Aes key size missmatch !"
                return None

    # the function generates encrypted files with the extension
    # *.enc encrypted files are stored in the specified format
    # below {[file size in bytes][IV][Cipher blocks]}.enc
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号