Picking a bcrypt library

There are several bcrypt libraries that are available for JavaScript:

  • bcrypt node.bcrypt.js): This is the most performant and efficient implementation of the bcrypt algorithm because it uses the C++ implementation and simply binds it to Node. However, it has a lot of dependencies and restrictions that make it messy to work with, notably:
    • Python 2.x.
    • node-gyp: Because bcrypt is written as a Node.js add-on, it is written in C++ and must be compiled for your machine's architecture before it can be used. This means that it must depend on node-gyp for its building and installation process. node-gyp only works with Long Term Support (LTS) versions of Node.
  • bcryptjs (npmjs.com/package/bcryptjs): A standalone JavaScript ...

Get Building Enterprise JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.