riaf / node-php-password

Compatibility with the password_* functions on PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-php-password

Compatibility with the password_* functions on PHP

Installation

$ npm install php-password

Usage

var phpPassword = require('php-password');

// Example password
var password = 'passw0rd';

// Create hashed password
var hashedPassword = phpPassword.hash(password);

// Verify the password
if (phpPassword.verify(password, hashedPassword)) {
  console.log('Success');
} else {
  console.log('Failed');
}

About

Compatibility with the password_* functions on PHP

License:MIT License


Languages

Language:JavaScript 100.0%