python工具类 md5

#python3
def
get_md5(s): if isinstance(s,str): s = s.encode("utf-8") m = hashlib.md5() m.update(s) return m.hexdigest()

 

posted @ 2020-03-02 21:11  AngDH  阅读(267)  评论(0编辑  收藏  举报