adapt ro new Python version
This commit is contained in:
+2
-2
@@ -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")))
|
||||||
|
|||||||
Reference in New Issue
Block a user