trandom (
bufferAmount=4,
bufferSize=8,
rounds=3,
x=0,
y=0,
z=0,
)
The only external interface to the TSEPRNG. Call this function to
get random data. Keep in mind that this is resource intensive random number generation.
You should only be calling this function for cryptographically secure
entropy. It is highly customizable.
bufferAmount sets the number of buffers to be raced over.
The more, the merrier. Just watch the resources. This value should be
proportional to your paranoia.
bufferSize is the size in bytes of the buffer to randomize. Make
sure the buffer size is a multiple of 2.
rounds specify how many iterations of the algorithm to conduct. This
value should be proportional to your paranoia. Cranking this will greatly
increase both the time required to generate a number and the overall
unpredictability of the result.
x, y, z are seed initializers to whrandom. Although
the TSEPRNG will produce numbers that are intractable to the seed used, you can
set these by hand it you wish. The default (0,0,0) will result in a time-based
seed.
The total number of threads that participate in the race is equal to
bufferAmount bufferSize*.
The function will return a string of length bufferAmount
bufferSize*.
This function defaults to 4 buffers of 8 bytes over 3 rounds
with seeds of 0,0,0.
Exceptions
|
|
ValueError( "If the Buffer amount is a multiple of two (2), more entropy results." )
|
|