import hashlib
def login(user, password):
user_password = hashlib.md5()
user_password.update(password.encode('utf-8'))
user1=db[user]
if user_password.hexdigest() == user1:
return True
else:
return False
Sign in to make a reply
用户6329855348
import hashlib
def login(user, password):
user_password = hashlib.md5()
user_password.update(password.encode('utf-8'))
user1=db[user]
if user_password.hexdigest() == user1:
return True
else:
return False