Example #1
0
 def verify_password(self, candidate):
     try:
         return Context.verify(candidate, self.password)
     except (ValueError, TypeError):
         return False
Example #2
0
 def set_password(self, new_password):
     self.password = Context.encrypt(new_password)