Library/Function to tell the user how secure their password is?
I n开发者_StackOverfloweed 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?
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.
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.
精彩评论