| 458 | } |
| 459 | |
| 460 | static void SeedFast(CSHA512& hasher) noexcept |
| 461 | { |
| 462 | unsigned char buffer[32]; |
| 463 | |
| 464 | // Stack pointer to indirectly commit to thread/callstack |
| 465 | const unsigned char* ptr = buffer; |
| 466 | hasher.Write((const unsigned char*)&ptr, sizeof(ptr)); |
| 467 | |
| 468 | // Hardware randomness is very fast when available; use it always. |
| 469 | SeedHardwareFast(hasher); |
| 470 | |
| 471 | // High-precision timestamp |
| 472 | SeedTimestamp(hasher); |
| 473 | } |
| 474 | |
| 475 | static void SeedSlow(CSHA512& hasher, RNGState& rng) noexcept |
| 476 | { |
no test coverage detected