初始化
This commit is contained in:
@@ -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()
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user