Bot-CQBOT/python-apiproject/dynamic_toekn/key_create.py
2024-07-06 09:47:19 +08:00

13 lines
343 B
Python

import hashlib
from dynamic_toekn.token_create import createTempToken
def md5_32_big(s):
result = hashlib.md5(s.encode("utf-8")).hexdigest().upper()
return result
def md5_32_sm(s):
result = hashlib.md5(s.encode("utf-8")).hexdigest().lower()
return result
def random_key(p=""):
return md5_32_sm(p+str(createTempToken()))