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())

 

posted @ 2018-10-23 11:12  献丑小角  阅读(105)  评论(0编辑  收藏  举报