You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
386 B
21 lines
386 B
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
# @Time : 2022/9/10 10:15
|
|
# @Author : old tom
|
|
# @File : fu_lang.py
|
|
# @Project : Futool
|
|
# @Desc : 字符串相关
|
|
|
|
import hashlib
|
|
|
|
|
|
def str_md5(content: str):
|
|
"""
|
|
字符串计算MD5
|
|
:param content:
|
|
:return:
|
|
"""
|
|
md5 = hashlib.md5()
|
|
md5.update(content.encode(encoding='utf-8'))
|
|
return md5.hexdigest()
|