Password strength is a measure of the effectiveness of a password in resisting guessing and brute-force attacks. In its usual form, it estimates how many trials an attacker who does not have direct access to the password would need, on average, to guess it correctly. The strength of a password is a function of length, complexity, and unpredictability.
Strongpassword-js is strong password generator. The password of generated by this library contained numbers, lower-characters, upper-characters and special characters. This library does not protect your password safety. But, If you are a software engineer, you can offer a strong password to your customers using this library.
get([size])
Return the strong password.
- size
- strong password size, default 15.
isstrong([password], [threshold])
Validate password is strong
- password
- Password for valication.
- threshold
- Threshold: min-length for strong password (default: 15).
Include strongpassword.min.js script file in your html page.
<script src="./dist/strongpassword.min.js"></script>
var passwd = strongpassword.get(); // sample output is ";[1rS2}l`Pb4F?~"
var passwd = strongpassword.get(20); // sample output is "8aD?&Pf|!0l7)I/2_Cw>"
var safe = strongpassword.issafe("8aD?&Pf|!0l7)I/2_Cw>"); // safe: true
var safe = strongpassword.issafe("8aD?&Pf|!0l7)I/2_Cw>", 10); // safe: true
var safe = strongpassword.issafe("8aD?&Pf|!0l7)I/2_Cw>", 25); // safe: false
strongpassword-js is available under the terms of the MIT License.