I need to be able to tell the user if their password is strong or weak (or in between). Is there a library or a function that already does this?
If there isn't, what would be the best approach to determining if a password is secure or not?
I need to be able to tell the user if their password is strong or weak (or in between). Is there a library or a function that already does this?
If there isn't, what would be the best approach to determining if a password is secure or not?
You can check out some articles on CodeProject. 1) http://www.codeproject.com/KB/edit/PasswordStrengh.aspx 2) http://www.codeproject.com/KB/security/passworddialog.aspx
A simple approach is to evaluate some regular expressions to check if it contains uppercase and lowercase letters, numbers, special symbols and the length of the password.
KeePass has a password strength function. You can download the source zip file from here. The file you are looking for is called QualityEstimation in KeePassLib.Cryptography.