Discuss / Python / 1

black度厄

#1 Created at ... [Delete] [Delete and Lock User]
def login(user, password):    if user in db:        db_md5 = db[user]        md52 = hashlib.md5()        md52.update(password .encode('utf-8'))        print(md52.hexdigest())        if db_md5 == md52.hexdigest():            return True    return False

  • 1

Reply