MCPcopy Create free account
hub / github.com/ElementsProject/elements / SeedInsecureRand

Function SeedInsecureRand

src/test/util/setup_common.h:63–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61void Seed(FastRandomContext& ctx);
62
63static inline void SeedInsecureRand(SeedRand seed = SeedRand::SEED)
64{
65 if (seed == SeedRand::ZEROS) {
66 g_insecure_rand_ctx = FastRandomContext(/*fDeterministic=*/true);
67 } else {
68 Seed(g_insecure_rand_ctx);
69 }
70}
71
72static inline uint32_t InsecureRand32() { return g_insecure_rand_ctx.rand32(); }
73static inline uint256 InsecureRand256() { return g_insecure_rand_ctx.rand256(); }

Callers 11

BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
prevector_testerMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
test_cacheFunction · 0.85
test_cache_eraseFunction · 0.85
test_cache_generationsFunction · 0.85
BasicTestingSetupMethod · 0.85

Calls 2

FastRandomContextClass · 0.85
SeedFunction · 0.85

Tested by

no test coverage detected