This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Re: password policy

 
Joe Cheung
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tom Tremain
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 410
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Yosi Hendarsjah
Ranch Hand
Posts: 166
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use regular expression.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic