VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Crypto.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Common/Crypto.c b/src/Common/Crypto.c
index 134a1715..dea4ff02 100644
--- a/src/Common/Crypto.c
+++ b/src/Common/Crypto.c
@@ -21,6 +21,7 @@
#include "EncryptionThreadPool.h"
#endif
#include "Volumes.h"
+#include "cpu.h"
/* Update the following when adding a new cipher or EA:
@@ -1051,7 +1052,11 @@ BOOL IsAesHwCpuSupported ()
if (!stateValid)
{
+#ifdef TC_WINDOWS_BOOT_AES
state = is_aes_hw_cpu_supported() ? TRUE : FALSE;
+#else
+ state = g_hasAESNI ? TRUE : FALSE;
+#endif
stateValid = TRUE;
}