| Author |
Help needed to generate token
|
Pradeep Kumar
Ranch Hand
Joined: Sep 08, 2006
Posts: 108
|
|
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
|
Thanks and Regards, Pradeep Kumar
SCJP 1.6, SCWCD 5.0
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12929
|
|
|
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?
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
UUID is about the only API class that can generate truly unique numbers.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: Help needed to generate token
|
|
|