1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 02:58:02 -06:00

Windows: Implement PIM caching, both for system encryption and for normal volumes. Add options to activate it in the Preferences and System Settings.

This commit is contained in:
Mounir IDRASSI
2015-12-20 20:11:50 +01:00
parent 7832d712fd
commit 8f6c08330a
17 changed files with 140 additions and 58 deletions

View File

@@ -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));