hashers
v1.0.1
Published
All password hashing algorithms for Django implemented in javascript for nodejs projects.
Readme
hashers
All password hashing algorithms for Django implemented in javascript for nodejs projects.
Supported Algorithms
- PBKDF2PasswordHasher
- PBKDF2SHA1PasswordHasher
- BCryptSHA256PasswordHasher
- BCryptPasswordHasher
- SHA1PasswordHasher
- MD5PasswordHasher
- UnsaltedSHA1PasswordHasher
- UnsaltedMD5PasswordHasher
- 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 falseInstallation
npm install hashersSimilar approach to the above code sample can be used for all the other algorithms.
