File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Re: password policy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Re: password policy" Watch "Re: password policy" New topic
Author

Re: password policy

Joe Cheung
Ranch Hand

Joined: Oct 18, 2002
Posts: 104
Dear all,

How can I implement my own password policy that the password must consists of at least one character (a-z or A-Z) and one numeric value (0-9) in Java?

Thanks!
Joe


Joe
Tom Tremain
Greenhorn

Joined: May 09, 2005
Posts: 1
A good place to start would be to read the javadocs for the the isDigit(char ch) and isLetter(char ch) static methods of the java.lang.Character class.

Using these methods inside of a loop should enable you to verify that a password meets the security requirements defined in your post.
Stuart Gray
Ranch Hand

Joined: Apr 21, 2005
Posts: 410
Yosi Hendarsjah
Ranch Hand

Joined: Oct 02, 2003
Posts: 164
You can use regular expression.
 
jQuery in Action, 2nd edition
 
subject: Re: password policy
 
Similar Threads
WA #1.....word association
Price of exam in India
Generating a String based on a Regular Exprssion
①
Finish my code please