Help on built-in module _md5:
NAME
_md5 #模块名
CLASSES
builtins.object #继承builtins.object类
md5
MD5Type = class md5(builtins.object)
| Methods defined here:
|
| copy(self, /)
| Return a copy of the hash object.
|
| digest(self, /)
| Return the digest value as a string of binary data.
|
| hexdigest(self, /)
| Return the digest value as a string of hexadecimal digits.
|
| update(self, obj, /)
| Update this hash object's state with the provided string.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| block_size
|
| digest_size
|
| name
FUNCTIONS
md5(string=b'')
Return a new MD5 hash object; optionally initialized with a string.
FILE
(built-in)
一、基本使用
In [1]: import _md5 #导入模块
In [2]: md5Object = _md5.md5(bytes("admin", 'utf8')) #创建对象
In [3]: md5Object.hexdigest() #生成MD5
Out[3]: '21232f297a57a5a743894a0e4a801fc3'
二、高级用法
...
网友评论