def __init__(self):
# TODO: placeholder for password. Will eventually take
# as an arg of some sort
self.password = b"password"
# TODO: need to sort out use of salt. Previously, salt was
# randomly generated in initKeys, but the resulting pass-
# words k & kPrime were different on each execution, and
# decryption was impossible. Hardcoding salt makes dectyption
# possible but may be a bad short cut
self.iv = None
self.salt = "$2b$12$ddTuco8zWXF2.kTqtOZa9O"
# Two keys, generated/Initialized by KDF
(self.k, self.kPrime) = self.initKeys()
# Two K's: generated/initialized by PRF
self.k1 = None
self.k2 = None
# client's cipher (AES w/ CBC)
self.cipher = self.initCipher()
# Stemming tool (cuts words to their roots/stems)
self.stemmer = PorterStemmer()
sse_client.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录