mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
Windows: Add option to enable use of CPU RDRAND/RDSEED as source of entropy which is now disabled by default
This commit is contained in:
@@ -1216,3 +1216,29 @@ BOOL IsHwEncryptionEnabled ()
|
||||
}
|
||||
|
||||
#endif // !TC_WINDOWS_BOOT
|
||||
|
||||
#ifndef TC_WINDOWS_BOOT
|
||||
|
||||
static BOOL CpuRngDisabled = FALSE;
|
||||
|
||||
BOOL IsCpuRngSupport ()
|
||||
{
|
||||
if (HasRDSEED() || HasRDSEED())
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void EnableCpuRng (BOOL enable)
|
||||
{
|
||||
CpuRngDisabled = !enable;
|
||||
}
|
||||
|
||||
BOOL IsCpuRngEnabled ()
|
||||
{
|
||||
return !CpuRngDisabled;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user