aspose file tools*
The moose likes Java in General and the fly likes Generating & Recognizing keys in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Generating & Recognizing keys in java" Watch "Generating & Recognizing keys in java" New topic
Author

Generating & Recognizing keys in java

lavnish lalchandani
Ranch Hand

Joined: Feb 28, 2007
Posts: 79
Hi
After running an ant target ( that checks java code for correct coding conventions ex variable naming conventions , proper indentation etc ) I need to generate a 16 digit (or more) code
When developer tries to checkin his code its required that he/she must enter this code else he/she wont be allowed to checkin

Not sure how to generate and recognize the keys ?? are there any libraries available for same ??


lavnish.blogspot.com
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14150
    
  18

Generating a 16-digit code is easy, just generate 16 random digits. Or are there other, extra requirements that you're not telling us?


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Sony Agrawal
Ranch Hand

Joined: Oct 04, 2009
Posts: 143
Jesper Young wrote:Generating a 16-digit code is easy, just generate 16 random digits. Or are there other, extra requirements that you're not telling us?

As Jesper Young said , its easy to generate the random 16 digit number but how to cross verify this number.... the recognize part ???

lavnish lalchandani wrote:Not sure how to generate and recognize the keys ?? are there any libraries available for same ??
lavnish lalchandani
Ranch Hand

Joined: Feb 28, 2007
Posts: 79
yeah more worried about how to cross verify this number.
Its something like 'registration keys' example when you install a software (MS word etc) you enter a code PARTICULAR 16 digit code not ANY code
as keys are for internal employees use only ... i am looking forward for some average algorithm .. not commercial level thing

the key may include number and/or alphabets
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generating & Recognizing keys in java