def check_password(self, password): return self.password == salted_hash(password, self.password)
def set_password(self, password): self.password = salted_hash(password) del self.shortcut