Ask questions[Question] Difference between bcrypt and bcryptjs

Newbie here. I can't figure out the differences between the bcrypt and bcryptjs libraries.

They both have 100s of thousands of downloads on npm every week. Are there any differences between them that are important enough to use one or the other?


Answer questions ridbay

Short summary: bcrypt is a native (C++) module, thus much faster than bcryptjs which is a pure js module.

bcrypt sometimes requires additional steps to build correctly, especially if you are using architectures other than x86_64 or a glibc based distro. You will need additional dependencies to compile from source.

bcryptjs is plain js, hence works everywhere, even browsers. bcrypt runs only on NodeJS, Node-WebKit or Electron.

Thanks for the response, really helpful.

Balogun Ridwan Babatunde Ridbay ridbay TechDigi Media Solutions Lagos, Nigeria I'm a developer, I use JavaScript to provide solutions.
Github User Rank List