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?
Generally speaking, the strength of a password is determined by three things: the length of the character set used, the length of the password itself, and to a lesser extent, the variety in characters chosen.
Using getpass() function to prompt user password The getpass() function is used to prompt to users using the string prompt and reads the input from the user as Password. The input read defaults to “Password: ” is returned to the caller as a string. Here, no prompt is provided by the caller.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With