There are a couple levels this could be happening at.
Most basic is that you have an algorithm that is chaotic (small verieties in input produces large verieties in output) and then feed it a predetermined number. For the next number just feed the previous number in. This is good enough for a casual user but if you look closely at the data you can reverse engineer the algorithm and thus predict future “random” numbers, this is probematic if you’re trying to stop a hacker.
A more advanced way is to find a more random starting number. A general list from less random to more random is: the exact current time, the exact value of some real life sensor (CPU temperature, microphone noise, camera input etc) or a quantum random number generator. The first is very easy to implement but can be predicted with enough effort and tries. The last is absolutely impossible to predict but very costly. Most modern applications use the second since it’s almost perfect and reasonably cost effective.
Latest Answers