-
Bug
-
Resolution: Not an Issue
-
P2
-
None
-
1.0
-
None
-
generic
-
generic
import java.util.Random;
import java.security.SecureRandom;
public class GenerateSeed {
If you Run this code on a Ultra 1, you will see that it takes over 5 seconds.
This code is used in generating a random in case of JSSE, so it appears that
this one of the reasons why its is slow.
Could you consider a native implementation of SecureRandom function with JDK
so speed up?
public static void main(String [] args)
{
int index;
SecureRandom s = new SecureRandom();
long t = System.currentTimeMillis();
for (index = 0; index < 5; index++) {
byte[] seed = s.generateSeed(20);
}
System.out.println ("Time per invocation = " + ((System.currentTimeMill
is() - t)/5) + " milliseconds.");
}
}
import java.security.SecureRandom;
public class GenerateSeed {
If you Run this code on a Ultra 1, you will see that it takes over 5 seconds.
This code is used in generating a random in case of JSSE, so it appears that
this one of the reasons why its is slow.
Could you consider a native implementation of SecureRandom function with JDK
so speed up?
public static void main(String [] args)
{
int index;
SecureRandom s = new SecureRandom();
long t = System.currentTimeMillis();
for (index = 0; index < 5; index++) {
byte[] seed = s.generateSeed(20);
}
System.out.println ("Time per invocation = " + ((System.currentTimeMill
is() - t)/5) + " milliseconds.");
}
}