Beispiel #1
0
 def db_value(self, value):
     return value if value is None else u(
         hashpw(
             b(value),
             gensalt(self.bcrypt_iterations)
         )
     )
Beispiel #2
0
 def db_value(self, value):
     return value if value is None else u(
         hashpw(
             b(value),
             gensalt(self.bcrypt_iterations)
         )
     )
Beispiel #3
0
    def check_password(self, password):
        password = b(password)
        pw_hash = b(self)

        hashed = b(hashpw(password, pw_hash))

        log.debug("Password hashed=%r self=%r", hashed, self)
        return hashed == pw_hash
Beispiel #4
0
    def check_password(self, password):
        password = b(password)
        pw_hash = b(self)

        hashed = b(hashpw(password, pw_hash))

        log.debug("Password hashed=%r self=%r", hashed, self)
        return hashed == pw_hash