#!/usr/bin/env python
# _*_coding:utf-8 _*_
# @Time    :20/05/2022 09:09
# @Author  :<NAME>
# @FileName: demo.py.py
# @Software: PyCharm

import time
#MD5模块在python3中被移除，在python3使用hashlib模块进行md5操作
import hashlib


#Python实现Cloud云平台的sign的md5加密
#key="wxsp";
#secret="<KEY>";
#timestamp=System.currentTimeMillis()，精确到ms
#sign = MD5.encoding(secret+key+secret+timestamp+secret).toUpperCase();
key = "wxsp"
secret="<KEY>"
timestamp= str(round(time.time() * 1000))

print(timestamp)

str = (secret+key+secret+timestamp+secret)
print(str)

sign = hashlib.md5()
sign.update(str.encode(encoding='utf-8'))

#sign = MD5.encoding(secret+key+secret+timestamp+secret).toUpperCase()
#hexdigest 十六进制
demo=sign.hexdigest()
#转换成大写
print(demo.upper())






#!/usr/bin/env python
# _*_coding:utf-8 _*_
# @Time    :20/05/2022 09:09
# @Author  :<NAME>
# @FileName: demo.py.py
# @Software: PyCharm

import time
#MD5模块在python3中被移除，在python3使用hashlib模块进行md5操作
import hashlib


#Python实现Cloud云平台的sign的md5加密
#key="wxsp";
#secret="<KEY>";
#timestamp=System.currentTimeMillis()，精确到ms
#sign = MD5.encoding(secret+key+secret+timestamp+secret).toUpperCase();
key = "wxsp"
secret="<KEY>"
timestamp= str(round(time.time() * 1000))

print(timestamp)

str = (secret+key+secret+timestamp+secret)
print(str)

sign = hashlib.md5()
sign.update(str.encode(encoding='utf-8'))

#sign = MD5.encoding(secret+key+secret+timestamp+secret).toUpperCase()
#hexdigest 十六进制
demo=sign.hexdigest()
#转换成大写
print(demo.upper())






#!/usr/bin/env python # _*_coding:utf-8 _*_ # @Time    :20/05/2022 09:09 # @Author  :<NAME> # @FileName: demo.py.py # @Software: PyCharm #MD5模块在python3中被移除，在python3使用hashlib模块进行md5操作 #Python实现Cloud云平台的sign的md5加密 #key="wxsp"; #secret="<KEY>"; #timestamp=System.currentTimeMillis()，精确到ms #sign = MD5.encoding(secret+key+secret+timestamp+secret).toUpperCase(); #sign = MD5.encoding(secret+key+secret+timestamp+secret).toUpperCase() #hexdigest 十六进制 #转换成大写