adapt ro new Python version

This commit is contained in:
Joerg Lehmann 2022-10-21 15:04:26 +02:00
parent 49be541e75
commit d2c08b6390
1 changed files with 2 additions and 2 deletions

View File

@ -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")))