第一题
import hashlib def login(user, password): md5 = hashlib.md5() md5.update(password.encode('utf-8')) if md5.hexdigest()==db[user]: return True return False
第二题
def login(username, password): user = db[username] return user.password == get_md5(password+user.salt)
Sign in to make a reply
°Destiny
第一题
第二题