[Bug classpath/24481] SecureRandom.setSeed has no impact
david at jpackage dot org
gcc-bugzilla@gcc.gnu.org
Tue Apr 11 04:34:00 GMT 2006
------- Comment #6 from david at jpackage dot org 2006-04-11 04:34 -------
I was saying something slightly different, since I did not test the program
across multiple runs. I did test nextBytes() within the same program run, and
this produced identical bytes with each successive call to nextBytes().
Checking the javadocs, I find:
``Note that this instance of SecureRandom has not been seeded... [but] [i]f a
call is not made to setSeed, the first call to the nextBytes method will force
the SecureRandom object to seed itself.''
Note that even though `new SecureRandom()' does not seed itself, any attempt to
extract randomness will cause it to seed itself first before returning any
bytes, so I believe the GNU implementation to be incorrect.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24481
More information about the Java-prs
mailing list