1.0.1 • Published 8 years ago

hashers v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

hashers

All password hashing algorithms for Django implemented in javascript for nodejs projects.

Supported Algorithms

  1. PBKDF2PasswordHasher
  2. PBKDF2SHA1PasswordHasher
  3. BCryptSHA256PasswordHasher
  4. BCryptPasswordHasher
  5. SHA1PasswordHasher
  6. MD5PasswordHasher
  7. UnsaltedSHA1PasswordHasher
  8. UnsaltedMD5PasswordHasher
  9. CryptPasswordHasher

Usage

var h = new PBKDF2PasswordHasher();
var hash1 = h.encode("password", h.salt());
console.log(h.verify("password", hash1)); // returns true
console.log(h.verify("wrong_password", hash1)); // returns false

Installation

npm install hashers

Similar approach to the above code sample can be used for all the other algorithms.