An interface to an EGD (entropy gathering daemon) random number source.
Programatically call the get_random_bytes() function.
Or as a command line utility, use the "--help" option.
For more information about EGD see:
- get_random_bytes(num_bytes, egd_path=None, blocking=True)
- Gets random bytes from an EGD daemon.
Attempts to return a string of num_bytes length with each character
having a random byte value. Requests for more than 255 bytes may
result in multiple low-level requests to the EGD daemon.
You may specify either a pathname to the EGD daemon's Unix domain
socket, or a TCP port number, or a TCP address in the format
"hostname:portnumber". If you do not supply a path, a set of
commonly used paths will be tried.
If blocking is true, then the EGD daemon is queried in blocking mode,
meaning that this function may be delayed in returning depending on
how much entropy is in the EGD pool. If blocking is false, then there
is a chance you may not receive as much random data as requested,
but you should not be indefinitely delayed.
- A command-line interface.
For usage information run:
python egd.py --help
||__author__ = 'Deron Meranda <http://deron.meranda.us/>'|
__credits__ = 'Hereby released into the PUBLIC DOMAIN.'
__date__ = '2008-01-05'
__version__ = '1.0'
main_usage = 'Usage: egd.py [--path=path] [--blocking|--nonblo... as many bytes (perhaps none) as you asked for.\n\n'
||Hereby released into the PUBLIC DOMAIN.|