adapt ro new Python version
This commit is contained in:
parent
49be541e75
commit
d2c08b6390
|
|
@ -13,6 +13,6 @@ if not password:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
# Hash a password for the first time, with a randomly-generated salt
|
# Hash a password for the first time, with a randomly-generated salt
|
||||||
hashed = bcrypt.hashpw(password, bcrypt.gensalt())
|
hashed = bcrypt.hashpw(password.encode('utf-8'), bcrypt.gensalt())
|
||||||
|
|
||||||
print "%s" % (hashed)
|
print("%s" % (hashed.decode("utf-8")))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue