第一题:
def calc_md5(password): md5 = hashlib.md5() md5.update(password.encode('utf-8')) return md5.hexdigest()
第二题:
def login(user, password): md5 = hashlib.md5() md5.update(password.encode('utf-8')) return md5.hexdigest() == db[user]
Sign in to make a reply
阿萌QVQ
第一题:
def calc_md5(password): md5 = hashlib.md5() md5.update(password.encode('utf-8')) return md5.hexdigest()
第二题:
def login(user, password): md5 = hashlib.md5() md5.update(password.encode('utf-8')) return md5.hexdigest() == db[user]