18460000105 0a606483d6 refactor(classes): 重构类转换ref插件 hai 1 mes
..
src 0a606483d6 refactor(classes): 重构类转换ref插件 hai 1 mes
LICENSE 0a606483d6 refactor(classes): 重构类转换ref插件 hai 1 mes
README.md 0a606483d6 refactor(classes): 重构类转换ref插件 hai 1 mes
package.json 0a606483d6 refactor(classes): 重构类转换ref插件 hai 1 mes

README.md

apache-crypt

Node.js package for Apache style password encryption using crypt(3).

build

Installation

Via git (or downloaded tarball):

$ git clone git://github.com/gevorg/apache-crypt.git

Via npm:

$ npm install apache-crypt

Usage

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);

Running tests

It uses mocha, so just run following command in package directory:

$ npm test

License

The MIT License (MIT)