Commit 39392943 by Sxy

fix: 回改加密方式

parent ab93319b
......@@ -11,7 +11,8 @@ class ServiceBase {
this.daoName = daoName;
this.dao = system.getObject("db." + gname + "." + daoName);
this.restS = system.getObject("util.restClient");
this.crypto=require('crypto');
this.crypto = require('crypto');
this.md5 = require("MD5");
}
/**
*
......@@ -25,8 +26,10 @@ class ServiceBase {
if (isComplexVerification) {
this.complexVerification(str)
}
let pwd = this.crypto.createHash("sha256").update(str + "_" + settings.salt, "utf8").digest("base64");
return pwd.toLowerCase();
// let pwd = this.crypto.createHash("sha256").update(str + "_" + settings.salt, "utf8").digest("base64");
// return pwd.toLowerCase();
var md5 = this.md5(str + "_" + settings.salt);
return md5.toString().toLowerCase();
}
complexVerification(str) {
......
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