randomgen.speck128.SPECK128.seed¶
-
SPECK128.seed(seed=
None, counter=None, key=None)¶ Seed the generator
This method is called when
SPECK128is initialized. It can be called again to re-Seed the generator For details, seeSPECK128.- Parameters:¶
- seed=
None¶ Entropy initializing the pseudo-random number generator. Can be an integer in [0, 2**256), a SeedSequence instance or
None(the default). If seed isNone, 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.- counter=
None¶ Integer in [0,2**128) containing the counter position or a 2-element array of uint64 containing the counter
- key=
None¶ Integer in [0,2**256) containing the key or a 4-element array of uint64 containing the key
- seed=
- Raises:¶
ValueError – If values are out of range for the PRNG or If seed and key are both set.
Notes
The two representation of the counter and key are related through array[i] = (value // 2**(64*i)) % 2**64.