Friday April 04, 2003
How do I implement password rules? Does anyone know of any open source packages or techniques for implementing password rules. For instance, I need to implement the following rules for password in my application:
Passwords must be made up of at least three (3) of the four (4) following classes of characters: Lowercase letters, Uppercase letters, Numbers, Special Characters.
I can probably whip up some JavaScript for this, but I'd need server-side code to catch if JavaScript is disabled. I'm guessing this is not possible with regular expressions.
Posted in Java
at Apr 04 2003, 10:36:31 AM MST
7 Comments
Search This Site
Recent Entries
- Wine Tasting in Napa Valley
- How to build a Shot-Ski
- Bus Project Update
- Farewell to the 2011-2012 Ski Season
- Cruising around the Western Caribbean
- Spring Break!
- A Spectacular Trip to Stockholm and Madrid
- Comparing Web Frameworks and HTML5 with Play Scala at Jfokus 2012
- Play Framework 2.0 with Peter Hilton at Jfokus
- Secure JSON Services with Play Scala and SecureSocial
Posted by Erik Hatcher on April 04, 2003 at 11:54 AM MST #
Posted by Matt Raible on April 04, 2003 at 12:22 PM MST #
Posted by Anonymous on April 04, 2003 at 12:35 PM MST #
Posted by Vic on April 04, 2003 at 02:00 PM MST #
boolean foundLower = false; boolean foundUpper = false; boolean foundDigit = false; boolean foundSpecial = false; for (int i=0;i<string.length();i++) { char ch = string.charAt(i); if (Character.isLowerCase(ch)) foundLower = true; if (Character.isUpperCase(ch)) foundUpper = true; if (Character.isDigit(ch)) foundDigit = true; if (isSpecial(ch)) foundSpecial = true; } int count = 0; if (foundLower) count++; if (foundUpper) count++; if (foundDigit) count++; if (foundSpecial) count++; return (count >= 3);Posted by Dave on April 04, 2003 at 02:29 PM MST #
Posted by Sheldon Hearn on April 07, 2003 at 04:35 AM MDT #
Posted by Sheldon Hearn on April 07, 2003 at 04:54 AM MDT #