Commit c254621c by 宋毅

tj

parent 7138b646
......@@ -138,28 +138,6 @@ class UtilsUserSve extends AppServiceBase {
let plainTex = "jsapi_ticket=" + ticket + "&noncestr=" + nonce + "&timestamp=" + timeStamp + "&url=" + url;
//1
// var BufferList = new Buffer(plainTex, "UTF-8");
// let signBufferList = cryptoJS.SHA1(BufferList).digest();
// let hexs = "";
// for (let i = 0; i < signBufferList.length; i++) {
// let hex = (signBufferList[i]).toString(16);
// if (hex.length === 1) {
// hexs = '0' + hex;
// }
// hexs += hex.toUpperCase();
// }
// const signature = hexs;
// 2
// let signature = cryptoJS.SHA1(plainTex).toString();
// 3
// let signature = cryptoJS.createHash('sha1').update(plainTex).digest('hex').toUpperCase();
//4
var sha1 = cryptoJS.createHash('sha1');
sha1.update(plainTex, 'utf8');
let signature = sha1.digest('hex');
......@@ -169,12 +147,9 @@ class UtilsUserSve extends AppServiceBase {
appkey: pobj.appInfo ? pobj.appInfo.uapp_key : "",
op: "center-app/app/base/service/impl/utilsSve/utilsuserSve.js/getJsApiSingnature",
content: "参数:" + plainTex + ",signature=" + signature,
optitle: "记录钉钉鉴权签名信息参数",
optitle: "记录钉钉鉴权签名信息参数4",
});
return signature;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment