-
Notifications
You must be signed in to change notification settings - Fork 357
bcrypt Installation Trouble
For some of us it's not always easy to install the bcrypt
module.
$ npm install bcrypt --save
If you have issues installing this module, go see the dependencies over at ncb000gt/node.bcrypt.js. I suggest you try getting this working before using an alternative method. Who knows, it might just further enlighten you as a developer.
All that's required for Ubuntu
$ sudo apt-get install build-essential
Some of the reasons we chose bcrypt
are:
- it's repo has few open issues with over 200 closed
- it's been updated relatively recently and seems to be more actively supported
- the maintainers are trusted in the community
I'm not a security expert, but bcrypt-nodejs
's docs say:
Native JS implementation of BCrypt for Node. Has the same functionality as node.bcrypt.js expect for a few tiny differences. Mainly, it doesn't let you set the seed length for creating the random byte array.
... and those tiny differences could mean a lot to someone who knows more than I do about security.
Ok cool. I just wanted you to know that stuff before blindly swapping the modules out. It's really easy to do anyways.
- "bcrypt": "~0.8.0"
+ "bcryptjs": "~2.0.2"
One occurrence. Version numbers may be different.
- var bcrypt = require('bcrypt');
+ var bcrypt = require('bcryptjs');
server/api/login.js
server/models/session.js
server/models/user.js
test/server/api/login.js
test/server/models/session.js
test/server/models/user.js
See that wasn't so hard. And now you know all this great stuff about bcrypt
. 🤘
We hope this was helpful. If you have questions or think this page should be expanded please contribute by opening an issue or updating this page.