RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v17]

Andrey Turbanov github.com+741251+turbanoff at openjdk.java.net
Sat Feb 13 15:10:42 UTC 2021


On Thu, 11 Feb 2021 16:02:03 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:

>> This PR is to introduce a new random number API for the JDK. The primary API is found in RandomGenerator and RandomGeneratorFactory. Further description can be found in the JEP https://openjdk.java.net/jeps/356 .
>> 
>> javadoc can be found at http://cr.openjdk.java.net/~jlaskey/prng/doc/api/java.base/java/util/random/package-summary.html
>> 
>> old PR:  https://github.com/openjdk/jdk/pull/1273
>
> Jim Laskey has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Added table of available algorithms.

src/java.base/share/classes/jdk/internal/util/random/RandomSupport.java line 115:

> 113:     static final String BAD_BOUND = "bound must be positive";
> 114:     static final String BAD_FLOATING_BOUND = "bound must be finite and positive";
> 115:     static final String BAD_RANGE = "bound must be greater than origin";

Unused fields in Random class now can be cleaned up: `java.util.Random#BadRange`, `java.util.Random#BadSize`

-------------

PR: https://git.openjdk.java.net/jdk/pull/1292


More information about the security-dev mailing list