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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user