The plugins site is currently in development.
We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.
ChronoStrength
ChronoStrength is a password strength checking plugin. However, rather than just saying "Too Weak" or "Strong", which don't really mean much, ChronoStrength displays how long it would take a regular desktop PC to crack the password using a brute-force attack. Seeing that their password would only take 30 seconds to crack might convince people to choose a more secure one!
Based on the code from http://howsecureismypassword.net/
Usage
ChronoStrength has two interface methods: attaching it to a text/password input or calling the function directly.
Attaching to a text/password input
To use ChronoStrength on password input:
$("input#password").chronoStrength();By default this will create a new with a class of "chronostrength-box" immediately after the password input.
Options
ChronoStrength has two options: calculationsPerSecond and placeInto.
calculationsPerSecond allows you to set the number of passwords a PC can try each second. Currently 10 million is used as a default, as this is roughly how many passwords a decent desktop PC could check. However you can send it any value you like:
$("input#password").chronoStrength({
calculationsPerSecond:100000000
});placeInto allows you to choose where ChornoStrength outputs the time it will take rather than having it use the default .
In HTML
<p>It would take <span class="password-strength"></span> for a desktop PC to crack your password.</p>In JavaScript
$("input#password").chronoStrength({
placeInto:"span.password-strength"
});Calling the function directly
You can also call the ChronoStrength function directly, which will return a string saying how long it would take to crack the password.
passwordStrength = $.chronoStrength(password);Additionally there is a chronoStrengthWithCustomSpeed function, which allows you to pass how many calculations per second a PC can do (10 million by default):
passwordStrength = $.chronoStrengthWithCustomSpeed(password, 100000000);