| 467 | } |
| 468 | |
| 469 | void SeedFast(CSHA512& hasher) noexcept |
| 470 | { |
| 471 | unsigned char buffer[32]; |
| 472 | |
| 473 | // Stack pointer to indirectly commit to thread/callstack |
| 474 | const unsigned char* ptr = buffer; |
| 475 | hasher.Write((const unsigned char*)&ptr, sizeof(ptr)); |
| 476 | |
| 477 | // Hardware randomness is very fast when available; use it always. |
| 478 | SeedHardwareFast(hasher); |
| 479 | |
| 480 | // High-precision timestamp |
| 481 | SeedTimestamp(hasher); |
| 482 | } |
| 483 | |
| 484 | void SeedSlow(CSHA512& hasher, RNGState& rng) noexcept |
| 485 | { |
no test coverage detected