import hashlib
def login(user, password):
md5=hashlib.md5()
md5.update(password.encode('utf-8'))
a=md5.hexdigest()
if db[user]==a:
return True
else:
return False
Sign in to make a reply
冷酷的皮皮丶
import hashlib
def login(user, password):
md5=hashlib.md5()
md5.update(password.encode('utf-8'))
a=md5.hexdigest()
if db[user]==a:
return True
else:
return False