2020
12-07
12-07
Python hashlib和hmac模块使用方法解析
python之hashlib模块:主要提供字符加密功能,python3中将md5和sha模块整合到了hashlib模块,支持md5,sha1,sha224,sha256,sha384,sha512等算法#!/usr/bin/envpython3#-*-coding:utf-8-*-importhashlib#md5加密算法a=hashlib.md5()a.update("HelloLanten.".encode("utf-8"))print("md5加密算法:",a.hexdigest())#sha224加密算法b=hashlib.sha224()b.update("HelloLanten.".encode("utf-8"))print("sha224加...
继续阅读 >