Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get really random number? [duplicate]

Possible Duplicates:
Understanding “randomness”
Fastest implementation of a true random number generator in C#

Hello. Function:

Random rand = new Random();
rand.Next()

It gives pseudo random numbers based on time in seconds. How to get really random numbers? I mean totally random not based on system time and some algorithm. Like, when you drop a cube you got really random number, not based on time and any algorithm.

What do you think about using short sample from mic or time between mouse position change?

like image 317
Hooch Avatar asked Nov 26 '22 20:11

Hooch


2 Answers

Put a cat in a box with a bottle of poison, which will be released when a single atom of a radioactive material decays. Come back in one hour and open the box. If the cat is dead, use 0 as a random bit in your program. If it is alive, use 1.

Repeat with as many cats and boxes as is necessary.

like image 186
AndrewF Avatar answered Feb 26 '23 16:02

AndrewF


you could use a service such as random.org

like image 41
jk. Avatar answered Feb 26 '23 17:02

jk.