Created
March 31, 2020 00:20
-
-
Save zachreizner/dedb83b6207b9cf15feadde993f78586 to your computer and use it in GitHub Desktop.
This file contains 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
# License: Public Domain | |
import base64 | |
import hashlib | |
import random | |
import string | |
import sys | |
salt = ''.join(random.choices(string.ascii_uppercase + string.ascii_lowercase + | |
string.digits, k = 16)).encode() | |
hashed = salt + sys.argv[1].encode() | |
for i in range(1000): | |
m = hashlib.sha512() | |
m.update(hashed) | |
hashed = m.digest() | |
salted = salt + base64.b64encode(hashed) | |
print(salted.decode()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment