python标准模块学习10_______sha模块
来源:互联网 发布:知豆汽车能开多久 编辑:程序博客网 时间:2024/06/16 18:31
与md5模块一样,同样是被hashlib封装的模块,接口函数和md5模块一样
1.生成目标hash值
1.直接生成
sha.sha(string).hexdigest()
2.现身成一个类似于对象的东西,然后调用方法输入要生成hash值得字符串
m = sha.sha()
m.update(string)
m.hexdigest()
3.调用new方法
sha.new(method,string)method为该模块中支持的hash算法,可以调用方法一查看,可以将结果赋值给一个变量,然后调用hexdigest()方法
0 0
- python标准模块学习10_______sha模块
- python标准模块学习1_______fnmatch模块
- python标准模块学习2_______re模块
- python标准模块学习4_______platform模块
- python标准模块学习5_______uuid模块
- python标准模块学习6_______urlparse模块
- python标准模块学习7_______webbrowser模块
- python标准模块学习8_______hashlib模块
- python标准模块学习9_______md5模块
- python标准模块学习11_______hmac模块
- python标准模块学习12_______json模块
- python标准模块学习13_______urllib2模块
- python标准模块学习14_______codecs模块
- python标准库fileinput模块学习
- python标准库os模块学习
- 【python标准库学习】re模块
- python标准模块学习3_______ConfigParser
- Python标准模块logging
- PyQt笔记--代码备份
- NYOJ 石子合并(一)(区间DP)
- C语言高效编程的四大绝招(1)
- 关于javascript
- mybatis实战教程(mybatis in action),mybatis入门到精通
- python标准模块学习10_______sha模块
- echarts使用心得
- L - 破译密码 有关字符串的处理
- 配置文件
- java的各种包
- Chapter 2 General Questions about Java
- poj 3225 区间
- PHP中的=>,->,@,&,::,%
- 基础知识(一)