初始化

This commit is contained in:
robin
2022-08-02 19:21:03 +08:00
parent 73c1343060
commit b7e5ee5fec
27 changed files with 564 additions and 156 deletions
@@ -1,4 +1,5 @@
const crypto = require('crypto');
const shortid = require('shortid');
module.exports = {
// 随机数(盐值)
getRandomSalt() {
@@ -20,4 +21,8 @@ module.exports = {
cryptPwdVerification(password, salt, user_password_md5) {
return this.cryptPwd(password, salt) === user_password_md5;
},
// 返回随机短uuid
shortid() {
return shortid.generate()
},
}