blob: 011400e8dca1d2043737ce680cf5ded87d05b1b8 (
plain)
1
2
3
4
5
6
7
8
9
10
|
import bcrypt
def enc(string):
return string.encode('utf-8')
def check_password(password, password_hash):
return bcrypt.checkpw(enc(password), password_hash)
def password_hash(password):
return bcrypt.hashpw(enc(password), bcrypt.gensalt());
|