How to check password strength using jQuery
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.