postman加密和使用当前时间戳
// 获取全局变量
uid = postman.getGlobalVariable(“uid”)
sid = postman.getGlobalVariable(“sid”)
//设置当前时间戳
postman.setGlobalVariable(“time”,Math.round(new Date().getTime()));
time = postman.getGlobalVariable(‘time’)
//设置KEY_WORD为全局变量
postman.setGlobalVariable(“Key”,"******")
KEY_WORD = postman.getGlobalVariable(“Key”);
//字符串进行md5加密
var str = uid+sid+time+KEY_WORD;
var strmd5= CryptoJS.MD5(str).toString();
postman.setGlobalVariable(“sign”,strmd5)
---------------------
作者:活跃家族
来源:CSDN
原文:https://blog.csdn.net/u012454429/article/details/82852034
版权声明:本文为博主原创文章,转载请附上博文链接!
努力就对了!
浙公网安备 33010602011771号