From 4b86d93709e7fcbaf9982a153ea37df60e0223f5 Mon Sep 17 00:00:00 2001 From: 付智勇 <fuzhiyong@efangtec.com> Date: Wed, 30 Aug 2017 20:26:06 +0800 Subject: [PATCH] no message --- util/saltMd5.js | 24 ------------------------ 1 file changed, 0 insertions(+), 24 deletions(-) delete mode 100644 util/saltMd5.js diff --git a/util/saltMd5.js b/util/saltMd5.js deleted file mode 100644 index c3a233b..0000000 --- a/util/saltMd5.js +++ /dev/null @@ -1,24 +0,0 @@ -const key="3mang"; -const crypto = require('crypto'); -module.exports={ - md5AddSalt:function(password){ - var salt=Math.floor(Math.random()*100); - var decipher = crypto.createHash('md5',key); - var md5Pass=decipher.update(password+""+salt).digest("hex"); - return { - salt:salt, - md5Pass:md5Pass - }; - }, - md5:function(password){ - var md5Pass = crypto.createHash('md5').update(password).digest("hex"); - return md5Pass - }, - md5Salt:function(password,salt){ - if(salt == null){ - salt = ''; - } - var decipher = crypto.createHash('md5',key); - return decipher.update(password+salt).digest("hex"); - } -}; \ No newline at end of file -- libgit2 0.24.0