Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8246516

java.util.UUID should support creation of type-5 name based UUID

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P5 P5
    • None
    • None
    • core-libs
    • None
    • generic
    • generic

      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.

            Unassigned Unassigned
            lcable Larry Cable
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: