Changeset View
Changeset View
Standalone View
Standalone View
src/random.cpp
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | static void InitHardwareRand() { | ||||
} | } | ||||
GetCPUID(7, 0, eax, ebx, ecx, edx); | GetCPUID(7, 0, eax, ebx, ecx, edx); | ||||
if (ebx & CPUID_F7_EBX_RDSEED) { | if (ebx & CPUID_F7_EBX_RDSEED) { | ||||
g_rdseed_supported = true; | g_rdseed_supported = true; | ||||
} | } | ||||
} | } | ||||
static void ReportHardwareRand() { | static void ReportHardwareRand() { | ||||
// This must be done in a separate function, as HWRandInit() may be | // This must be done in a separate function, as InitHardwareRand() may be | ||||
// indirectly called from global constructors, before logging is | // indirectly called from global constructors, before logging is | ||||
// initialized. | // initialized. | ||||
if (g_rdseed_supported) { | if (g_rdseed_supported) { | ||||
LogPrintf("Using RdSeed as additional entropy source\n"); | LogPrintf("Using RdSeed as additional entropy source\n"); | ||||
} | } | ||||
if (g_rdrand_supported) { | if (g_rdrand_supported) { | ||||
LogPrintf("Using RdRand as an additional entropy source\n"); | LogPrintf("Using RdRand as an additional entropy source\n"); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 731 Lines • Show Last 20 Lines |