MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / RDRandInit

Function RDRandInit

src/random.cpp:81–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79static bool rdrand_supported = false;
80static constexpr uint32_t CPUID_F1_ECX_RDRAND = 0x40000000;
81static void RDRandInit()
82{
83 uint32_t eax, ebx, ecx, edx;
84 if (__get_cpuid(1, &eax, &ebx, &ecx, &edx) && (ecx & CPUID_F1_ECX_RDRAND)) {
85 LogPrintf("Using RdRand as an additional entropy source\n");
86 rdrand_supported = true;
87 }
88 hwrand_initialized.store(true);
89}
90#else
91static void RDRandInit() {}
92#endif

Callers 1

RandomInitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected