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

SecureRandom nextLong memory usage

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 25
    • security-libs
    • None

      SecureRandom uses straightforward implementations inherited from Random but in the process does double the memory allocations necessary.
      The delegation to SecureRandom.engineNextBytes does not provide `int` or `long` values, the caller must allocate a byte array and assemble the value itself.
      Random.nextLong() could be enhanced to do a single allocation and assemble the long value.

            kthirupattur Koushik Muthukrishnan Thirupattur
            rriggs Roger Riggs
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: