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