Created
February 18, 2021 02:14
-
-
Save 44670/41f4eab92ac28d9eb20f95f343589d2c to your computer and use it in GitHub Desktop.
genpass.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import getpass | |
import base64 | |
from hashlib import pbkdf2_hmac | |
pwd = getpass.getpass() | |
salt = input('Website Name:') | |
iters = 10000 | |
hmac = pbkdf2_hmac(hash_name='sha256',password=pwd.encode('utf8'),salt=salt.encode('utf8'),iterations=iters) | |
pwd = base64.b64encode(hmac).decode('utf8') | |
print(pwd) | |
print(pwd[:16] + '!1') | |
input('Goodbye.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment