MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / SeedFast

Function SeedFast

src/random.cpp:469–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467}
468
469void 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
484void SeedSlow(CSHA512& hasher, RNGState& rng) noexcept
485{

Callers 3

SeedSlowFunction · 0.85
SeedPeriodicFunction · 0.85
ProcRandFunction · 0.85

Calls 3

SeedHardwareFastFunction · 0.85
SeedTimestampFunction · 0.85
WriteMethod · 0.45

Tested by

no test coverage detected