passec
v1.0.7
Published
Passec checks the security of the entered passwords, and returns a score. ## Installation ```javascript npm install passec --save ``` ## Usage ```javascript var passec = require('passec'); ``` ```javascript var password = "12345";
Downloads
7
Maintainers
Readme
passec
Passec checks the security of the entered passwords, and returns a score.
Installation
npm install passec --save
## Usage
var passec = require('passec');
var password = "12345";
console.log(passec.score(password))
// -35
console.log(passec.returns(password))
// Your password is less than 6 characters, Your password can be easily guessed
var password = "Password00?&";
console.log(passec.score(password))
// 80
console.log(passec.returns(password))
// null
Usage in Register System
var password = req.body.password;
if(passec.score(password) > 50){ // 50 is recommended
// do something
}else{
res.send(passec.returns(password));
// response -> Your password can be easily guessed
}
Author
rimekod