hashlib.md5

import hashlib

def md5(args):
    hash = hashlib.md5(Config.SALT)
    hash.update(bytes(args, encoding='utf-8'))
    print(hash.hexdigest())
    return hash.hexdigest()

md5('123') ---参数必须是字符串

posted @ 2018-06-18 15:54  liang哥哥  阅读(92)  评论(0)    收藏  举报