Storing passwords securely?

import md5

from getpass import getpass


password = 'test'


md5password = md5.new(password).digest()


while 1:

# echos input
#input = raw_input("Password:\n")

# this doesn't ! :)
input = getpass()

if md5password == md5.new(input).digest():
    print "Correct password!"
    break
else:
    print "Incorrect password sunshine! Try again"
Feedback

Powered by Vanilla PHP feedback form