Bot-CQBOT/python-apiproject/dynamic_toekn/key_create.py

13 lines
343 B
Python
Raw Permalink Normal View History

2024-07-06 01:47:19 +00:00
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()))