SecureRandom on Linux
843810Mar 13 2002 — edited Nov 2 2005I have written a small program to check whether SecureRandom is working or not.
(I have problems with https connections.I thing it uses this class)
I have run it on 3 machines .
2 linux machines and a windows machine.
It returns a number on one linux machine and windows machine.
But this program never returns anything on one linux machine.(Incidentally this is the machine i need it run)
Any idea as to whether SecureRandom need any operating system libraries ...
import java.security.SecureRandom;
class seed
{
public static void main(String args[])
{
try{
System.setProperty("java.security.debug","all");
System.out.println("I will try to instantiate SecureRandom now");
SecureRandom rand = new SecureRandom();
//trigger seeding by calling for some data
int dummy = rand.nextInt();
System.out.println(dummy);
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
Thanks in Advance
Srinivas Anne