The non-cryptographic RNG implemented by random() has the property that a seed value of zero will result in a generated sequence of all-zero values. This situation can arise if currticks() returns zero at start of day. Work around this problem by falling back to a fixed non-zero seed if necessary. This has no effect on the separate DRBG used by cryptographic code. Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
||
18 | 18 |
|
19 | 19 |
|
20 | 20 |
|
21 |
|
|
22 |
|
|
21 | 23 |
|
22 | 24 |
|
23 | 25 |
|