def generateKeys(password, nonce):
resultBytes = []
for i in range(1, 5):
currNonce = nonce + bytearray([i])
resultBytes.append(KeyStream.pbkdf2(password, currNonce, 2, 20))
return resultBytes
#@staticmethod ##use if drop python-2.6 support
#def pbkdf2( password, salt, itercount, keylen):
# return bytearray(hashlib.pbkdf2_hmac('sha1', password, salt, itercount, keylen))
评论列表
文章目录