From 8f6c08330ac37b7729d8c1bf7276e8fede2d17fa Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 20 Dec 2015 20:11:50 +0100 Subject: Windows: Implement PIM caching, both for system encryption and for normal volumes. Add options to activate it in the Preferences and System Settings. --- src/Common/Volumes.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Common/Volumes.c') 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)); -- cgit v1.2.3