with random.SystemRandom() i'm getting a speed increase of 35x. the
following function:
def RandBytes(n):
"""Return n random bytes."""
gen = random.SystemRandom()
return ''.join([chr(gen.randrange(0,256)) for i in xrange(n)])
takes about 0.7 msec to complete. is this the most optimal way to
generate a random byte string? is there be something wrong with my
installation?
-andres