File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help needed to generate token

 
Pradeep Kumar
Ranch Hand
Posts: 108
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a requirement to generate a unique token which is of type String of Alphanumeric characters. The length of the string should always be 24. I am using MD5 algorith. Can you please tell me how to generate the unique token string.

Thanks and Regards,
Pradeep
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MD5 is an algorithm that creates hash codes, and does not have anything to do with generating unique tokens, and cannot be used for creating unique tokens. How are you trying to use MD5 for this?
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
UUID is about the only API class that can generate truly unique numbers.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic