pbkdf2-mosquitto

0.1.1 • Public • Published

pbkdf2-mosquitto

NPM

A small module to generate/validate PBKDF2-sha256 passwords as required by mosquitto-auth-plug in node.js

Usage

createPasswordAsync(password, callback);

  • password: Desired password (plain)
  • callback: To be called after PBKDF2 hash creation. Expects a string parameter that is the PBKDF2 hash generated.

verifyCredentials(password, PBKDF2Hash, callback);

  • password: Desired password (plain)
  • PBKDF2Hash: A PBKDF2 in mosquitto-auth-plug format to be compared to plain 'password'.
  • callback: To be called after password-PBKDF2Hash verification. Expects a boolean parameter (true=Password ok, false=Password does not match).

See test.js for a more detailed example.

License

MIT :-)

Package Sidebar

Install

npm i pbkdf2-mosquitto

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • djimenezjerez