12345678910111213141516171819202122232425262728293031 |
- def hash_key_salt(self):
-
-
- hasher = hashlib.new(self.hash_type)
- hasher.update(self.user_key)
-
- self.hashed_key_salt["key"] = bytes(hasher.hexdigest()[:32], "utf-8")
-
- del hasher
-
-
- hasher = hashlib.new(self.hash_type)
- hasher.update(self.user_salt)
-
- self.hashed_key_salt["salt"] = bytes(hasher.hexdigest()[:16], "utf-8")
-
- del hasher
|