10 lines
295 B
Python
10 lines
295 B
Python
# nix-shell -p python310Packages.bcrypt --run 'python gen-pass.py'
|
|
# https://prometheus.io/docs/guides/basic-auth/
|
|
|
|
import getpass
|
|
import bcrypt
|
|
|
|
password = getpass.getpass("password: ")
|
|
hashed_password = bcrypt.hashpw(password.encode("utf-8"), bcrypt.gensalt())
|
|
print(hashed_password.decode())
|