salthashpassword
v1.0.2
Published
Functions to salt and hash passwords.
Downloads
2
Readme
SaltHashPassword
SaltHashPassword is a nodejs object for salt hashing passwords with SHA256 and a salt factor of 10.
Installation
Use npm install
npm i salthashpassword
Usage
var saltHash = require('salthashpassword');
var hashedPassword = saltHash.Sha256HashPassword('secretpassword');
if(saltHash.IsPasswordMatch("tryingtohack", hashedPassword)){
console.log("You hacked in!!");
}else{
console.log("Not allowed in.")
}
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.