phpbb's password hashing algorithm for Nodejs


phpbb's password hashing algorithm for Nodejs

npm install --save phpbb-password
npm install -g phpbb-password
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 
export HASH=$(phpbb-password hash "mypassword")
echo $(phpbb-password verify "mypassword" "$HASH")
  • Tests !
  • Async ?

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 !