import hashlib from app.config import md5_salt # 生成md5 def generate_md5(text: str): content = text + md5_salt return hashlib.md5(content.encode('utf-8')).hexdigest()