1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-12 11:28:26 -06:00

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.

This commit is contained in:
Mounir IDRASSI
2020-06-20 15:10:28 +02:00
parent d031addc2c
commit 0121dc0b81
4 changed files with 20 additions and 0 deletions

View File

@@ -2234,6 +2234,11 @@ static VOID DecoySystemWipeThreadProc (PVOID threadArg)
goto err;
}
#ifdef _WIN64
if (IsRamEncryptionEnabled ())
VcProtectKeys (wipeCryptoInfo, VcGetEncryptionID (wipeCryptoInfo));
#endif
EncryptDataUnits (wipeRandBuffer, &dataUnit, wipeBlockSize / ENCRYPTION_DATA_UNIT_SIZE, wipeCryptoInfo);
memcpy (wipeRandChars, wipeRandBuffer, sizeof (wipeRandChars));