Ejemplo n.º 1
0
def valid_hash(value, hashed):
  return bcrypt.hashpw(value, hashed) == hashed
Ejemplo n.º 2
0
def hash(value):
  salt = bcrypt.gensalt()
  return bcrypt.hashpw(str(value), salt)