From d2c08b6390d8371f99e394452b0e57dd894eb9df Mon Sep 17 00:00:00 2001 From: Joerg Lehmann Date: Fri, 21 Oct 2022 15:04:26 +0200 Subject: [PATCH] adapt ro new Python version --- sysoper/hashme.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysoper/hashme.py b/sysoper/hashme.py index 0ff7ba2..f051ce5 100755 --- a/sysoper/hashme.py +++ b/sysoper/hashme.py @@ -13,6 +13,6 @@ if not password: sys.exit() # 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")))