Name: jn10789 Date: 02/09/99 SecureRandom takes an inordinate amount of time to initialize in Windows 98. I am running on a 300 MHz Pentium II with Windows 98, 192 MB RAM, and 8 GB HD space. Nothing else is running at the time the following program runs. I tried with and without optimization. import java.security.*; import java.util.*; public final class RandomTest { private SecureRandom random = new SecureRandom(); public RandomTest() { Date start = new Date(); System.out.println("Random int: " + random.nextInt()); Date end = new Date(); System.out.println("Start: " + start); System.out.println("End: " + end); } public static void main(String[] args) { new RandomTest(); } } And the output: Random int: -1035658255 Start: Sat Feb 06 12:19:10 EST 1999 End: Sat Feb 06 12:19:44 EST 1999 Note that it took 34 seconds to initialize! I have run SecureRandom (1.1.6) on a Windows NT machine (150 MHz Pentium) and it only took about 5 seconds to start up. Any ideas? Thanks, Ralph (###@###.###) (Review ID: 53841) ======================================================================
|