def decryptAndVerify(self, ciphertextPickle, senderPublic):
try:
if (ciphertextPickle):
decoded = pickle.loads(ciphertextPickle)
if (decoded):
signature = decoded[0]
content = decoded[1]
if (rsa.verify(content, signature, senderPublic)):
debug("crypt", "Message signature was verified. Decrypting..")
return rsa.decrypt(content, self.DRMPrivateKey)
else:
debug("crypt", "Message was empty. \"No Updates\"")
except Exception as e:
debug("crypt", "Error decrypting message. -> %s" % str(e))
# Load the keys
Context.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录