Created
November 8, 2016 15:33
-
-
Save AndyNovo/a77af8b17b9a7e44a1c47e9c643eb083 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