Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

md5 加密 #26

Open
253867843 opened this issue Aug 29, 2019 · 0 comments
Open

md5 加密 #26

253867843 opened this issue Aug 29, 2019 · 0 comments
Assignees
Labels

Comments

@253867843
Copy link
Owner

实现md5加密

插件 utility

npm install --save-dev utility

编写方法

const utils = require('utility');

function md5Pwd(pwd){
   const salt = 'diadem_adinno_1234567890~!@#$%^&*()';
   return utils.md5(utils.md5(pwd+salt));
}

使用

UserModel.create({user, pwd: md5Pwd(pwd), phone, type}, ...)
@253867843 253867843 added the js label Aug 29, 2019
@253867843 253867843 self-assigned this Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant