#!/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()