8220732: setSeed(long) java api doc is missing warning about provided seed quality

Reviewed-by: wetmore
This commit is contained in:
Kevin Driver 2022-06-15 21:03:04 +00:00 committed by Weijun Wang
parent 6d595614a2
commit 1855e9d201

View file

@ -725,6 +725,11 @@ public class SecureRandom extends java.util.Random {
* in the given {@code long seed}. The given seed supplements,
* rather than replaces, the existing seed. Thus, repeated calls
* are guaranteed never to reduce randomness.
* <p>
* A PRNG {@code SecureRandom} will not seed itself automatically if
* {@code setSeed} is called before any {@code nextBytes} or {@code reseed}
* calls. The caller should make sure that the {@code seed} argument
* contains enough entropy for the security of this {@code SecureRandom}.
*
* <p>This method is defined for compatibility with
* {@code java.util.Random}.