craftbeerpi4-pione/create_password.py

6 lines
171 B
Python
Raw Normal View History

2018-11-01 19:50:04 +01:00
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))