#!/usr/bin/env python3
"""
Make a password hash to paste into config.json.

Run:   python genpass.py
Type your password, it prints the hash. Copy that hash and use it as the
KEY for an app in config.json (replace the long key, keep the name/url).

The real password is NEVER stored anywhere. Only its hash goes in the file,
and a hash can't be turned back into the password.
"""

import hashlib
import getpass

pw = getpass.getpass("New password: ")
print("\nHash (put this as the key in config.json):\n")
print(hashlib.sha256(pw.encode()).hexdigest())
