Last active
November 2, 2019 08:06
-
-
Save 44670/a4e5c2094b6d900fa28b84acb2dd83ef to your computer and use it in GitHub Desktop.
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 = raw_input('Salt:') | |
iters = 10000 | |
hmac = pbkdf2_hmac(hash_name='sha256',password=pwd,salt=salt,iterations=iters) | |
pwd = base64.b64encode(hmac) | |
print(pwd) | |
print(pwd[:16]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment