Re: True Random Numbers?

From: Brian S O'Neill (broneill_at_earthlink.net)
Date: 10/13/03


Date: Mon, 13 Oct 2003 04:18:24 GMT

You should take a look at the SecureRandom class that comes with Java.
Of course, you don't want to re-seed or re-create it in the middle of
the loop.

Nicholas Geraldi wrote:
> Im looking for a decent random number generator. Im looking to make a large
> number of random numbers (100 or so, if not more) in a short period of time
> (as fast as possible).
>
> the function i was using to get random numbers was
>
> Random rn = new Random(System.currentTimeMillis());
>
> but it seems that the system doesn't update the milliseconds often enough to
> cause a true randomaziation (i ran just the System.currentTimeMillis() in a
> for loop 200 times and only got 3 unique results)
>
> any suggestions on how to get a quantity of real random numbers?
>
> Thanks
> Nick
>
>
>
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----== Over 100,000 Newsgroups - 19 Different Servers! =-----