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

Function InitHardwareRand

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

Source from the content-addressed store, hash-verified

79#endif
80
81static void InitHardwareRand()
82{
83 uint32_t eax, ebx, ecx, edx;
84 GetCPUID(1, 0, eax, ebx, ecx, edx);
85 if (ecx & CPUID_F1_ECX_RDRAND) {
86 g_rdrand_supported = true;
87 }
88 GetCPUID(7, 0, eax, ebx, ecx, edx);
89 if (ebx & CPUID_F7_EBX_RDSEED) {
90 g_rdseed_supported = true;
91 }
92}
93
94static void ReportHardwareRand()
95{

Callers 1

RNGStateMethod · 0.85

Calls 1

GetCPUIDFunction · 0.85

Tested by

no test coverage detected