Extract entropy from rng, strengthen it, and feed it into hasher. */
| 495 | |
| 496 | /** Extract entropy from rng, strengthen it, and feed it into hasher. */ |
| 497 | static void SeedStrengthen(CSHA512& hasher, RNGState& rng, int microseconds) noexcept |
| 498 | { |
| 499 | // Generate 32 bytes of entropy from the RNG, and a copy of the entropy already in hasher. |
| 500 | unsigned char strengthen_seed[32]; |
| 501 | rng.MixExtract(strengthen_seed, sizeof(strengthen_seed), CSHA512(hasher), false); |
| 502 | // Strengthen the seed, and feed it into hasher. |
| 503 | Strengthen(strengthen_seed, microseconds, hasher); |
| 504 | } |
| 505 | |
| 506 | static void SeedPeriodic(CSHA512& hasher, RNGState& rng) noexcept |
| 507 | { |
no test coverage detected