How to check password strength using jQuery

Many websites give an indicator of how secure a password is, and require a minimum standard of security. However this is always poorly implemented with rules such as 'must require a number' even if the password is 30 characters long and clearly very secure. Often the only requirement is a minimum number of characters, a very poor indicator of password strength.

Complexify is a jQuery password strength meter plugin. Complexify calculates a rating for the password based on how difficult it would be to brute-force it. What does this actually mean?

  • If I have an 8 character password that only uses lower case characters, it's not good enough and I will need to make it better.
  • But if I have a 25 character password that happens to not have a number in it, I am not going to be forced to add one.
Complexify's default settings will enforce a level of complexity that would mean brute-forcing should take ~600 years on a commodity desktop machine. The 'perfect' password used to scale the complexity percentage would take 3×10^33 years.

How to use it?

First download the plugin and include the reference of it's library and jQuery library.
//Code Starts
$("#password").complexify(options, callback(valid, complexity){...});
//Code Ends
The valid argument passed to your callback function is a boolean that indicates whether the password met the minimum number of password characters and the minimum level of complexity. The complexity argument is a percentage where 100% represents a 'perfect' password of 25 characters containing one element from each available character set.
Feel free to contact me for any help related to jQuery, I will gladly help you.

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..