本文共 384 字,大约阅读时间需要 1 分钟。
md5 加密import hashlibhash = hashlib.sha1()data = "你好"encode = hashlib.md5(data.encode("utf8"))print (encode.hexdigest())对md5 进行特定字符串加密import hmach = hmac.new('abcd')h.update('nihao')print h.hexdigest()
C:\Users\pcdog\AppData\Local\Programs\Python\Python35\python.exe C:/Users/pcdog/PycharmProjects/untitled/md5_hash.py
7eca689f0d3389d9dea66ae112e5cfd7
Process finished with exit code 0
转载地址:http://butea.baihongyu.com/