Password Strength Check Module (
mod_password )
A quick module I wrote from the
Global Watchlist source code, this module connects to Google's password rating API to rate a password's strength. It's very simple, and consists of only one function.
int GetPasswordStrength( string password, [bool ignoreLength [, string userName]] )password - The password, as a string
ignoreLength - If true, password length is not checked. (Optional and false by default.)
userName - The username, which can be used for additional security checks. (Optional)
The function returns an integer from 0-4, or null if an error occurs. The ratings are as follows:
- 0 - Too short.
- 1 - Insecure.
- 2 - Okay.
- 3 - Good.
- 4 - Excellent.
Download (revision 2)
Combined Package (Linux, Source, and Windows in one ZIP)
Archive
Revision 1
Combined Package (Linux, Source, and Windows in one ZIP)