11 lines
182 B
Python
11 lines
182 B
Python
|
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()
|
||
|
|
||
|
|
||
|
|