pybtls.lib.libbtls.seed#
- seed(s: SupportsInt | SupportsIndex) None#
Seed the process-wide random number generator.
If never called, the generator is seeded non-deterministically at library load time (the default behaviour). Calling seed() makes all subsequent traffic generation and sampling deterministic for the given value.
In multiprocessing contexts (spawn start method), each worker process has its own copy of the generator, so calling
seed(master_seed + worker_id)in each worker produces independent, reproducible streams.- Parameters:
s (int) – Seed value (unsigned 64-bit integer).