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

Function GetRandBytes

src/random.cpp:601–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

599std::atomic<bool> g_used_g_prng{false}; // Only accessed from tests
600
601void GetRandBytes(std::span<unsigned char> bytes) noexcept
602{
603 g_used_g_prng = true;
604 ProcRand(bytes.data(), bytes.size(), RNGLevel::FAST, /*always_use_real_rng=*/false);
605}
606
607void GetStrongRandBytes(std::span<unsigned char> bytes) noexcept
608{

Callers 8

GetRandHashFunction · 0.85
protocolinfo_cbMethod · 0.85
GenerateUniquePrefixMethod · 0.85
VerifyPubKeyMethod · 0.85
ECC_StartFunction · 0.85
ProcessPCPFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
GenerateAuthCookieFunction · 0.85

Calls 3

ProcRandFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68