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

sun.security.provider.SecureRandom default constructor has wrong documentation

    XMLWordPrintable

Details

    Description

      A DESCRIPTION OF THE PROBLEM :
      sun.security.provider.SecureRandom default constructor javadoc says:

      > This empty constructor automatically seeds the generator....

      But it doesn't seed the generator at all as you can see from the following code excerpts from https://hg.openjdk.java.net/jdk/jdk/ around r47216:

      public SecureRandom() {
        init(null);
      }
      ...
      private void init(byte[] seed) {
        ...
        if (seed != null) {
          engineSetSeed(seed);
        }
      }

      Where no seeding happens for the default constructor.


      Attachments

        Issue Links

          Activity

            People

              wetmore Bradford Wetmore
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: