码迷,mamicode.com
首页 > 编程语言 > 详细

python之hashlib模块

时间:2017-09-23 15:29:22      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:class   main   ash   dig   code   type   iges   from   import   

from hashlib import md5, sha512


# from _hashlib import HASH


def main():
    # md = md5()
    md = sha512()
    # print(type(md), md)
    md.update(zxl.encode())
    md.update(hhu.encode())
    result = md.hexdigest()
    print(type(result), result)
    # result=md.digest()
    # print(type(result), result)


def main2():
    # md = md5()
    md = sha512()
    md.update(zxlhhu.encode())
    result = md.hexdigest()
    print(type(result), result)


if __name__ == __main__:
    main()
    main2()

 

python之hashlib模块

标签:class   main   ash   dig   code   type   iges   from   import   

原文地址:http://www.cnblogs.com/zhaoxianglong1987/p/7581120.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!