Commit 39392943 by Sxy

fix: 回改加密方式

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