Encryption in Meteor

非 Y 不嫁゛ 提交于 2019-12-03 13:50:42

问题


I have user sign in form. It has about 10 inputs. I want to save that user, random generate password and hash and salt it and save it. How to achieve that? I couldn't find any good tutorial for using Crypto.js in meteor. I always stumble upon account-password package.


回答1:


accounts-password actually takes care of this for you. I wish the documentation of the implementation details was better, but you can see an overview here.

Passwords are verified by examining hashes, so only a hashed version of the passed from the client to the server which is then run through bcrypt.

client: password --> network: sha256(password) --> server: bcrypt(sha256(password))

What's nice about this implementation is: (a) the server never sees or stores password-equivalent data, (b) it's all done for you just by installing the package.

Also see this hackpad for more details.



来源:https://stackoverflow.com/questions/28648326/encryption-in-meteor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!