I understand that I should use os.urandom()
or SystemRandom
in Python for 'secure' pseudo-random numbers.
But how does Python generate these random numbers logically?
Also is there a way to generate a number in Python that is 'more random' than others?
For "secure" random numbers, Python doesn't actually generate them: it gets them from the operating system, which has a special driver that gathers entropy from various real-world sources, such as variations in timing between keystrokes and disk seeks.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments