I am trying to compare hashes using Python, but I am stuck with this problem:
print ('-- '+hashesFile[h])
print ('-> ' +hashlib.md5(wordsFile[j]).hexdigest())
-- 5d21e42d34fc1563bb2c73b3e1811357
-> 5d21e42d34fc1563bb2c73b3e1811357
But this comparison is never performed:
if (hashesFile[h] == hashlib.md5(wordsFile[j]).hexdigest()):
print ('ok')
I searched for a solution and tried to encode the string before comparing them, but still does not work.
Hooray!!
source
share