The UUID class currently supports a static method for the creation of type 3 name based UUIDs (using a 126 bits MD5 hash):
public static UUID nameUUIDFromBytes(byte[] name)
There exists a type 5 name based UUID that utilizes a truncated (160->128 bit) SHA-1 hash.
Ideally the UUID class should support the creation of type 5 UUIDs in addition to the current type 3 support either through the addition of an additional method, or thru modification of the existing method above.
In addition RFC 4122 defines a number of "namespace" UUIDs to be used when hashing name based UUIDs, including, DNS, URL, ISO OID, X500 DN.
constants should be added to provide these.
it might also be appropriate to define such a constant for a "Java" namespace.
public static UUID nameUUIDFromBytes(byte[] name)
There exists a type 5 name based UUID that utilizes a truncated (160->128 bit) SHA-1 hash.
Ideally the UUID class should support the creation of type 5 UUIDs in addition to the current type 3 support either through the addition of an additional method, or thru modification of the existing method above.
In addition RFC 4122 defines a number of "namespace" UUIDs to be used when hashing name based UUIDs, including, DNS, URL, ISO OID, X500 DN.
constants should be added to provide these.
it might also be appropriate to define such a constant for a "Java" namespace.
- duplicates
-
JDK-8273642 The UUID class does not implement RFC4122 fully (UUID type 5 is missing).
-
- Closed
-