Python基础19模块-hashlib模块

1.hashlib模块简单应用

1 import hashlib
2 #该方法会被撞库破解
3 # m = hashlib.sha256()
4 # m.update('hello'.encode('utf-8'))
5 # print(m.hexdigest())
6 m = hashlib.sha256('admin'.encode('utf-8'))
7 m.update('hello'.encode('utf-8'))
8 print(m.hexdigest())

猜你喜欢

转载自www.cnblogs.com/josie930813/p/9835559.html
今日推荐