Heres my code:
import hashlib
real = hashlib.sha512("mom")
status = True
while status:
inp = raw_input("What's the password?")
converted = hashlib.sha512(inp)
if converted == real:
print "Access granted!"
status = False
else:
print "Access denied."
I'm new to hashlib, and I'm just playing around with it. What I thought this would do is validate the users input to the hash of the actual password, however if you enter the correct password, it still comes up "Access denied." Can anyone point me in the right direction?