Node.js module for Apache style password encryption using crypt(3).
npm install apache-crypt
Via git (or downloaded tarball):
``bash`
$ git clone git://github.com/gevorg/apache-crypt.git
Via npm:
`bash`
$ npm install apache-crypt
`javascript
const crypt = require("apache-crypt");
// Encrypting password using auto-generated 2 char salt.
const encryptedPassword = crypt("mypass");
// Should print true.
console.log(crypt("mypass", encryptedPassword) == encryptedPassword);
// Should print false.
console.log(crypt("notmypass", encryptedPassword) == encryptedPassword);
`
It uses mocha, so just run following command in package directory:
`bash``
$ npm test
The MIT License (MIT)