craftbeerpi4-pione/create_password.py
2018-11-01 19:50:04 +01:00

6 lines
No EOL
171 B
Python

import sys
from getpass import getpass
from passlib.hash import sha512_crypt
passwd = input() if not sys.stdin.isatty() else getpass()
print(sha512_crypt.encrypt(passwd))