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

Method fillrand

src/random.cpp:626–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

624}
625
626void FastRandomContext::fillrand(std::span<std::byte> output) noexcept
627{
628 if (requires_seed) RandomSeed();
629 rng.Keystream(output);
630}
631
632FastRandomContext::FastRandomContext(const uint256& seed) noexcept : requires_seed(false), rng(MakeByteSpan(seed)) {}
633

Callers 7

GenerateRandomGarbageFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
ChaCha20SplitFuzzFunction · 0.45
RandomContentFillMethod · 0.45
RandomContentCheckMethod · 0.45
BIP324_ECDHFunction · 0.45
InitBlocksdirXorKeyFunction · 0.45

Calls 2

RandomSeedFunction · 0.85
KeystreamMethod · 0.45

Tested by 4

BOOST_AUTO_TEST_CASEFunction · 0.36
ChaCha20SplitFuzzFunction · 0.36
RandomContentFillMethod · 0.36
RandomContentCheckMethod · 0.36