Skip to content

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 unpredictab…

License

Notifications You must be signed in to change notification settings

jongha/strongpassword-js

Repository files navigation

strongpassword-js

Build Status Coverage Status Dependency Status

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.

Description

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).

Usage

Include strongpassword.min.js script file in your html page.

<script src="./dist/strongpassword.min.js"></script>

Sample

Generate safe password

var passwd = strongpassword.get(); // sample output is ";[1rS2}l`Pb4F?~"
var passwd = strongpassword.get(20); // sample output is "8aD?&Pf|!0l7)I/2_Cw>"

Valicate safe password

var safe = strongpassword.issafe("8aD?&Pf|!0l7)I/2_Cw>"); // safe: true

Usage min-length threshold parameter

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

License

strongpassword-js is available under the terms of the MIT License.

About

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 unpredictab…

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published