初始化

This commit is contained in:
robin committed 2022-08-02 19:21:03 +08:00
1 parent 73c1343060
commit b7e5ee5fec
27 files changed
+564 -156

No files matched your search

@@ -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()
},
}