hashers
v1.0.1
Published
All password hashing algorithms for Django implemented in javascript for nodejs projects.
Downloads
4
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 false
Installation
npm install hashers
Similar approach to the above code sample can be used for all the other algorithms.