|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gridbus.broker.util.RandomGUID
public class RandomGUID
RandomGUID generates truly random GUIDs by using the system's IP address (name/IP), system time in milliseconds (as an integer), and a very large random number joined together in a single String that is passed through an MD5 hash. The IP address and system time make the MD5 seed globally unique and the random number guarantees that the generated GUIDs will have no discernable pattern and cannot be guessed given any number of previously generated GUIDs. It is generally not possible to access the seed information (IP, time, random number) from the resulting GUIDs as the MD5 hash algorithm provides one way encryption. This code is contributed by Marc A. Mnich
Constructor Summary | |
---|---|
RandomGUID()
Default constructor. |
|
RandomGUID(boolean secure)
Constructor with security option. |
Method Summary | |
---|---|
java.lang.String |
toString()
Convert to the standard format for GUID (Useful for SQL Server UniqueIdentifiers, etc.) Example: C2FEEEAC-CFCD-11D1-8B05-00600806D9B6 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RandomGUID()
public RandomGUID(boolean secure)
secure
- Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |