python MD5生成

admin 2016年8月18日15:57:40Python评论1,950 次浏览阅读模式

第一种:

import md5

src = 'this is a md5 test.'   
m1 = md5.new()   
m1.update(src)   
print m1.hexdigest()

第二种:

import hashlib   

m2 = hashlib.md5()   
m2.update(src)   
print m2.hexdigest()

相关文章
weinxin
我的微信
微信扫一扫
admin
  • 本文由 发表于 2016年8月18日15:57:40
  • 转载请务必保留本文链接:https://anyun.org/a/jishuguanzhu/bianchengchalou/python/2016/0818/5966.html

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: