If you use Python, why are you interested in a particular implementation? Just use the random module and let it handle it.
Other than that (if you cannot rely on the state of the software) os.urandom provides random values โโbased on os:
On a UNIX-like system, this will request / dev / urandom, while on Windows it will use CryptGenRandom.
(Note that random.SystemRandom provides a good interface for this.)
If you're seriously really cryptographically random, you can check out PyCrypto .
Gareth latty
source share