Пример #1
0
 def set_password(self, password):
     """ Sets the instance's password hash to match the hash of the
         provided string."""
     password, salt = generate_user_hash_and_salt(password)
     self['password'] = password
     self['salt'] = salt
     self.save()
Пример #2
0
 def generate_hash_and_salt(self, password):
     return generate_user_hash_and_salt(password)