Created
January 26, 2019 16:25
-
-
Save edouard-lopez/55846fb55eff97ebc88a07b3901a90b5 to your computer and use it in GitHub Desktop.
Run with `python algo.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 hashlib | |
import binascii | |
def calc_entropy(): | |
digest_algorithm = "sha256" | |
master_password = 'password' | |
salt = 'site'+'login'+hex(1)[2:] | |
iterations = 100000 | |
derived_key_length = 32 | |
entropy = hashlib.pbkdf2_hmac(digest_algorithm, master_password, salt, iterations, derived_key_length) | |
print entropy | |
if __name__ == '__main__': | |
calc_entropy() |
Author
edouard-lopez
commented
Jan 26, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment