The Sun/Oracle JDK exposes a function to create a type 3 (name based) UUID in the java.util package: java.util.UUID.nameUUIDFromBytes(byte[] name).
I need to be able to generate a type 3 UUID in Java using nameUUIDFromBytes and arrive at the same UUID when creating a type 3 UUID in another language, assuming I provide the same bytes as the source.
According to the javadocs this function creates a RFC 4122 compliant type 3 UUID. However, according to the RFC 4122 spec, a type 3 UUID must be created within some namespace. Most other languages allow you specify the namespace when creating a type 3 UUID (e.g. the UUIDTools gem in Ruby).
So my question is: what namespace UUID is used by the JDK when I invoke nameUUIDFromBytes?
A Sample Code:
See this bug report
Especially the comment, near the bottom:
I don't know if i trust this to work correctly, but it should be easy to test using the predefined namespeces from the UUID spec, comparing with same UUID generated by some other implementation.