Created
February 10, 2016 13:46
-
-
Save AndyNovo/dc83b8d8d189b46cce7e 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 hashlib, cProfile | |
f=file('dictionary.txt','r') | |
words = [word.strip() for word in f] | |
f.close() | |
secretHash=hashlib.sha512("banana").hexdigest() | |
def checkDictionary(secret): | |
return [word for word in words if hashlib.sha512(word).hexdigest() == secret] | |
cProfile.run('checkDictionary(secretHash)') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment