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

DrbgParameters strength parameter is underspecified if < -1

XMLWordPrintable

      From looking at the code, it looks like the implementation treats any value for the strength parameter that is < 0 as a default strength.

      In that case, I think the API should be updated to specify that. In fact, it is currently underspecified since it does not say how values < -1 are handled. However, it may be more reasonable to throw IllegalArgumentException if the strength parameter is < -1.

      This affects the instantiation and nextBytes methods which both take a strength parameter.

            weijun Weijun Wang
            mullan Sean Mullan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: