Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SecureRandom on Linux

843810Mar 13 2002 — edited Nov 2 2005
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 30 2005
Added on Mar 13 2002
8 comments
854 views