Created
November 1, 2024 13:51
-
-
Save vndee/4329f388a73604d63795b269640ace96 to your computer and use it in GitHub Desktop.
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
# Using operating system's secure random source | |
import os | |
true_random_bytes = os.urandom(16) | |
# On Linux systems | |
with open("/dev/random", "rb") as f: | |
hardware_random = f.read(16) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment