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

MD5 MessageDigest in java.util.UUID should be cached

    XMLWordPrintable

Details

    • generic
    • generic

    Description

      A DESCRIPTION OF THE PROBLEM :
      In current implementation lookup of MD5 MessageDigest happens for each call to UUID#nameUUIDFromBytes(byte[]):
          MessageDigest md;
          try {
              md = MessageDigest.getInstance("MD5");
          } catch (NoSuchAlgorithmException nsae) {
              throw new InternalError("MD5 not supported", nsae);
          }
      this may be enhanced by adding an internal holder-class (as done for SecureRandom via Holder inner class) to store MessageDigest which the former method would reference


      Attachments

        Issue Links

          Activity

            People

              rriggs Roger Riggs
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: