From 0121dc0b81722ac07abac27d8215c524260bb3f2 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 20 Jun 2020 15:10:28 +0200 Subject: Windows: Fix issue when RAM encryption used, AES selected and AES-NI not supported by CPU that caused the free space of newly created volumes not filled with random data even if "quick format" is not selected by user. --- src/Common/Fat.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Common/Fat.c') diff --git a/src/Common/Fat.c b/src/Common/Fat.c index 8d4cc7d8..cd2c124f 100644 --- a/src/Common/Fat.c +++ b/src/Common/Fat.c @@ -442,6 +442,11 @@ FormatFat (void* hwndDlgPtr, unsigned __int64 startSector, fatparams * ft, void return ERR_MODE_INIT_FAILED; } +#ifdef _WIN64 + if (IsRamEncryptionEnabled ()) + VcProtectKeys (cryptoInfo, VcGetEncryptionID (cryptoInfo)); +#endif + x = ft->num_sectors - ft->reserved - ft->size_root_dir / ft->sector_size - ft->fat_length * 2; while (x--) { -- cgit v1.2.3