Package com.atlassian.bamboo.utils
Class RandomGUID
- java.lang.Object
-
- com.atlassian.bamboo.utils.RandomGUID
-
public class RandomGUID extends Object
This class generates Global Unique Ids (GUIDS).RandomGUID generates truly random GUIDs by combining the system's IP address (name/IP), system time in milliseconds, and a very large random number joined together in a single String that is then passed through an MD5 hash.
It's not possible to access the seed information (IP, time, random number) from the resulting GUIDs as the MD5 hash algorithm provides one way encryption.
-
-
Constructor Summary
Constructors Constructor Description RandomGUID()With no specification of security option, this constructor defaults to lower security, high performance.RandomGUID(boolean secure)Setting secure true enables each random number generated to be cryptographically strong.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringtoString()Convert to the standard format for GUID (Useful for SQL Server UniqueIdentifiers, etc.)
-
-
-
Constructor Detail
-
RandomGUID
public RandomGUID()
With no specification of security option, this constructor defaults to lower security, high performance.
-
RandomGUID
public RandomGUID(boolean secure)
Setting secure true enables each random number generated to be cryptographically strong.Secure false defaults to the standard Random function seeded with a single cryptographically strong random number.
-
-