Esempio n. 1
0
 def db_value(self, value):
     return value if value is None else u(
         hashpw(
             b(value),
             gensalt(self.bcrypt_iterations)
         )
     )
Esempio n. 2
0
 def db_value(self, value):
     return value if value is None else u(
         hashpw(
             b(value),
             gensalt(self.bcrypt_iterations)
         )
     )
Esempio n. 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
Esempio n. 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