summaryrefslogtreecommitdiff
path: root/extra/bin/hashgen.py
blob: 55534659beb7e1d385065a1c94e5974ac0099652 (plain)
1
2
3
4
5
6
7
8
#!/bin/env python3
import crypt
import getpass

password = getpass.getpass("\nWhat password would you like to hash/salt?\n(NOTE: will NOT echo back!)\n")
salt = crypt.mksalt(crypt.METHOD_SHA512)
salthash = crypt.crypt(password, salt)
print("\nYour salted hash is:\n\t{0}\n".format(salthash))