Discuss / Python / 作业

作业

Topic source

阿萌QVQ

#1 Created at ... [Delete] [Delete and Lock User]

第一题:

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]


  • 1

Reply