Reads random bytes from the /dev/random entropy pool.

        NOTE: /dev/random is a blocking pseudorandom number generator.
        If the entropy pool runs out, this function will block until more
        environmental noise is gathered.
        If entropy re-use is unnacceptable use this over "dev_urandom_entropy".

        If "fallback_to_urandom" is set, this function will fallback to
        /dev/urandom on operating systems without /dev/random.

def dev_random_entropy(numbytes, fallback_to_urandom=True):
    """ Reads random bytes from the /dev/random entropy pool.

        NOTE: /dev/random is a blocking pseudorandom number generator.
        If the entropy pool runs out, this function will block until more
        environmental noise is gathered.
        If entropy re-use is unnacceptable use this over "dev_urandom_entropy".

        If "fallback_to_urandom" is set, this function will fallback to
        /dev/urandom on operating systems without /dev/random.
    """
    if os.name == 'nt' and fallback_to_urandom:
        return dev_urandom_entropy(numbytes)
    return open("/dev/random", "rb").read(numbytes)