Skip to content

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

License

Notifications You must be signed in to change notification settings

manolodd/mosquitto-pbkdf2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mosquitto-pbkdf2

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published