File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes SecureRandom Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "SecureRandom" Watch "SecureRandom" New topic


Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
Hey -- um, anybody know what the heck this baby does? I'm actually just concerned with it in the context of:

I'm using it with the commons-id framework and wondering how likely it is to get two identical random numbers if they're called close enough together, or if Sun's implementation of this algorithm magically does something to make it "unlikely."

Well, any help would be wonderful.

john guthrie
Ranch Hand

Joined: Aug 05, 2002
Posts: 124
secure random is a pretty solid implementation of a PRNG. it's not based at all on system clock, so when you try to generate the random numbers should have nothing to do with the RNs you get. also, from the name it looks like it hashes the entropy value, so even if the two values were time-based (and close together) the hash would change that.
I agree. Here's the link:
subject: SecureRandom
It's not a secret anymore!