phpbb-password

phpbb's password hashing algorithm for Nodejs

npm install phpbb-password
13 downloads in the last month

node-phpbb-password

phpbb's password hashing algorithm for Nodejs

Installation

In a project

npm install --save phpbb-password

For command line use

npm install -g phpbb-password

Usage

In your code


var phpbb = require('phpbb-password');

// hash a password
var hash = phpbb.hash('bonjour, mot de passe');
console.log(hash); // examples : $H$9sPKRpbzFtCY8ZGFvmPQU7qAaZlQ1E. $H$9940UI0zss3hbAt6bytgCIAthYapG20

// verify 
var ok = phpbb.check_hash('bonjour, mot de passe', hash);
console.log(ok); // true

In the shell

export HASH=$(phpbb-password hash "mypassword")

echo $(phpbb-password verify "mypassword" "$HASH")

TODO

  • Tests !
  • Async ?

License

GNU General Public License v2

Since the original PHP code come from PHPbb itself, I think this code must also be under the GPLv2. If you think we can use BSD or something else, let me know !

npm loves you