public final class InsecureUuid extends Object
Modifier and Type | Field and Description |
---|---|
private long |
leastSigBits |
private long |
mostSigBits |
Modifier | Constructor and Description |
---|---|
private |
InsecureUuid(byte[] data) |
Modifier and Type | Method and Description |
---|---|
private static String |
digits(long val,
int digits)
Returns val represented by the specified number of hex digits.
|
static String |
getId() |
static InsecureUuid |
randomInsecureUuid()
Static factory to retrieve a type 4 (pseudo randomly generated) UUID.
|
String |
toString()
Returns a
String object representing this UUID . |
private final long mostSigBits
private final long leastSigBits
public static String getId()
public static InsecureUuid randomInsecureUuid()
UUID
public String toString()
String
object representing this UUID
.
The UUID string representation is as described by this BNF:
UUID = <time_low> "-" <time_mid> "-" <time_high_and_version> "-" <variant_and_sequence> "-" <node> time_low = 4*<hexOctet> time_mid = 2*<hexOctet> time_high_and_version = 2*<hexOctet> variant_and_sequence = 2*<hexOctet> node = 6*<hexOctet> hexOctet = <hexDigit><hexDigit> hexDigit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "A" | "B" | "C" | "D" | "E" | "F"
private static String digits(long val, int digits)