Пример #1
0
 def check_password(self, clear_passwd):
     '''
     check if the given password equals the stored one
     '''
     return self.password == hash_password(clear_passwd)
Пример #2
0
 def set_password(self, clear_passwd):
     '''
     set the password property, by hashing it with the utils.hash_password function
     '''
     self.password = hash_password(clear_passwd)