Normally, you initialize some kind of random number generator object with a seed (usually, the time) at the start of the application and then keep it around and ask it for random numbers. This object is the state.
I have an application that starts, generates one number, then exits. Since the RNG is initialized from the clock, I still have some randomness, but standard RNGs provided by frameworks are not meant to be used like this (asking the first number of each seed), so the quality of the generated numbers is poor. How do I generate quality random numbers without saving the state of the RNG between the invocations of my application?
I'm doing this on Windows, if it matters. Getting extra sources of randomness is fine, but leaving data behind (e.g. writing to disk) is not allowed.
Aucun commentaire:
Enregistrer un commentaire