VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/ExpandVolume/InitDataArea.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ExpandVolume/InitDataArea.c')
-rw-r--r--src/ExpandVolume/InitDataArea.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ExpandVolume/InitDataArea.c b/src/ExpandVolume/InitDataArea.c
index 618358d1..709f44b9 100644
--- a/src/ExpandVolume/InitDataArea.c
+++ b/src/ExpandVolume/InitDataArea.c
@@ -116,6 +116,11 @@ int FormatNoFs (HWND hwndDlg, unsigned __int64 startSector, __int64 num_sectors,
goto fail;
}
+#ifdef _WIN64
+ if (IsRamEncryptionEnabled ())
+ VcProtectKeys (cryptoInfo, VcGetEncryptionID (cryptoInfo));
+#endif
+
while (num_sectors--)
{
if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo,