VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Volumes.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-12-20 20:11:50 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-12-21 01:19:04 +0100
commit8f6c08330ac37b7729d8c1bf7276e8fede2d17fa (patch)
treed395993fe27894fcc2436e7a8e7a35ab4040da00 /src/Common/Volumes.c
parent7832d712fda877001ea5ae825d1a07d424cb72b7 (diff)
downloadVeraCrypt-8f6c08330ac37b7729d8c1bf7276e8fede2d17fa.tar.gz
VeraCrypt-8f6c08330ac37b7729d8c1bf7276e8fede2d17fa.zip
Windows: Implement PIM caching, both for system encryption and for normal volumes. Add options to activate it in the Preferences and System Settings.
Diffstat (limited to 'src/Common/Volumes.c')
-rw-r--r--src/Common/Volumes.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Common/Volumes.c b/src/Common/Volumes.c
index 3f0c5b67..b19b8114 100644
--- a/src/Common/Volumes.c
+++ b/src/Common/Volumes.c
@@ -187,6 +187,10 @@ int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int
LONG outstandingWorkItemCount = 0;
int i;
+ // if no PIM specified, use default value
+ if (pim < 0)
+ pim = 0;
+
if (truecryptMode)
{
// SHA-256 not supported in TrueCrypt mode
@@ -806,6 +810,10 @@ int CreateVolumeHeaderInMemory (HWND hwndDlg, BOOL bBoot, char *header, int ea,
if (cryptoInfo == NULL)
return ERR_OUTOFMEMORY;
+ // if no PIM specified, use default value
+ if (pim < 0)
+ pim = 0;
+
memset (header, 0, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
VirtualLock (&keyInfo, sizeof (keyInfo));