/** * Returns true if and only if a password passes the rules: * - Must be at least 8 characters.
There’s no excuse for not implementing them in your applications, and the Password Validator library makes it trivial.
I recently had to validate a password like this and so I created a password validation class that allows easy validation of a password string to a set of given parameters, but also allow these parameters to be changed when needed. The Password class takes a set of parameters, which can be altered at runtime, and uses these to validate a password.
To run the password validator with default parameters do the following: This will return false because it does not meet the minimum requirements needed for the password to be valid.
The stuff I learn on non-critical optimization often helps me when I do have a bottleneck.
I will not be implementing something just because it is faster.