File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "SecureRandom" Watch "SecureRandom" New topic
Author

SecureRandom

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.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
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: http://aspose.com/file-tools
 
subject: SecureRandom
 
Similar Threads
Reliability of using the VMID as a seed for SecureRandom in generating GUID's
KeyGenerator using JCE
Ljava error
How is session id generated in weblogic?
Random in C++ and Java