CSPRNG (Cryptographically Secure Pseudo-Random Number Generator) functions:
os.urandom(n)
: return a string of n random bytes.random.SystemRandom()
: provides random functions that usesos.urandom()
.
Note: Don't use random
module for PRNG for security purposes.