Created
February 25, 2020 18:30
-
-
Save edwinb-ai/b8604536772d9ef1b9917776e4b97db8 to your computer and use it in GitHub Desktop.
Obtain a truly random seed from the system by using random files and entropy.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
def some_seed(): | |
seed = int.from_bytes(os.urandom(7), sys.byteorder) | |
return seed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment