randomgen.hc128.HC128.seed

HC128.seed(seed=None, key=None)

Seed the generator

This method is called at initialization. It can be called again to re-Seed the generator

Parameters:
seed=None

Random seed initializing the pseudo-random number generator. Can be an integer in [0, 2**64), array of integers in [0, 2**64), a SeedSequence instance or None (the default). If seed is None, then data is read from /dev/urandom (or the Windows analog) if available. If unavailable, a hash of the time and process ID is used.

key=None

Key for HC128. The key is a 256-bit integer that contains both the key (lower 128 bits) and initial values (upper 128-bits) for the HC-128 cipher. key and seed cannot both be used.

Raises:

ValueError – If seed values are out of range for the PRNG.