diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Common/Crypto.h | 3 | ||||
-rw-r--r-- | src/Format/InPlace.c | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/Common/Crypto.h b/src/Common/Crypto.h index e66ac18c..ac925094 100644 --- a/src/Common/Crypto.h +++ b/src/Common/Crypto.h | |||
@@ -159,6 +159,9 @@ typedef struct | |||
159 | # define PRAND_DISK_WIPE_PASSES 256 | 159 | # define PRAND_DISK_WIPE_PASSES 256 |
160 | #endif | 160 | #endif |
161 | 161 | ||
162 | /* specific value for volume header wipe used only when drive is fully wiped. */ | ||
163 | #define PRAND_HEADER_WIPE_PASSES 3 | ||
164 | |||
162 | #if !defined (TC_WINDOWS_BOOT) || defined (TC_WINDOWS_BOOT_AES) | 165 | #if !defined (TC_WINDOWS_BOOT) || defined (TC_WINDOWS_BOOT_AES) |
163 | # include "Aes.h" | 166 | # include "Aes.h" |
164 | #else | 167 | #else |
diff --git a/src/Format/InPlace.c b/src/Format/InPlace.c index 228e2e5f..b1bfac98 100644 --- a/src/Format/InPlace.c +++ b/src/Format/InPlace.c | |||
@@ -501,7 +501,7 @@ int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, vol | |||
501 | area is occuppied by data until the very end of the process). */ | 501 | area is occuppied by data until the very end of the process). */ |
502 | 502 | ||
503 | // Prepare the backup header | 503 | // Prepare the backup header |
504 | for (int wipePass = 0; wipePass < (wipeAlgorithm == TC_WIPE_NONE ? 1 : PRAND_DISK_WIPE_PASSES); wipePass++) | 504 | for (int wipePass = 0; wipePass < (wipeAlgorithm == TC_WIPE_NONE ? 1 : PRAND_HEADER_WIPE_PASSES); wipePass++) |
505 | { | 505 | { |
506 | nStatus = CreateVolumeHeaderInMemory (FALSE, | 506 | nStatus = CreateVolumeHeaderInMemory (FALSE, |
507 | header, | 507 | header, |
@@ -518,7 +518,7 @@ int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, vol | |||
518 | 0, | 518 | 0, |
519 | volParams->headerFlags | TC_HEADER_FLAG_NONSYS_INPLACE_ENC, | 519 | volParams->headerFlags | TC_HEADER_FLAG_NONSYS_INPLACE_ENC, |
520 | volParams->sectorSize, | 520 | volParams->sectorSize, |
521 | wipeAlgorithm == TC_WIPE_NONE ? FALSE : (wipePass < PRAND_DISK_WIPE_PASSES - 1)); | 521 | wipeAlgorithm == TC_WIPE_NONE ? FALSE : (wipePass < PRAND_HEADER_WIPE_PASSES - 1)); |
522 | 522 | ||
523 | if (nStatus != 0) | 523 | if (nStatus != 0) |
524 | goto closing_seq; | 524 | goto closing_seq; |
@@ -969,7 +969,7 @@ inplace_enc_read: | |||
969 | 969 | ||
970 | SetNonSysInplaceEncUIStatus (NONSYS_INPLACE_ENC_STATUS_FINALIZING); | 970 | SetNonSysInplaceEncUIStatus (NONSYS_INPLACE_ENC_STATUS_FINALIZING); |
971 | 971 | ||
972 | for (int wipePass = 0; wipePass < (wipeAlgorithm == TC_WIPE_NONE ? 1 : PRAND_DISK_WIPE_PASSES); wipePass++) | 972 | for (int wipePass = 0; wipePass < (wipeAlgorithm == TC_WIPE_NONE ? 1 : PRAND_HEADER_WIPE_PASSES); wipePass++) |
973 | { | 973 | { |
974 | nStatus = CreateVolumeHeaderInMemory (FALSE, | 974 | nStatus = CreateVolumeHeaderInMemory (FALSE, |
975 | header, | 975 | header, |
@@ -986,7 +986,7 @@ inplace_enc_read: | |||
986 | masterCryptoInfo->RequiredProgramVersion, | 986 | masterCryptoInfo->RequiredProgramVersion, |
987 | masterCryptoInfo->HeaderFlags | TC_HEADER_FLAG_NONSYS_INPLACE_ENC, | 987 | masterCryptoInfo->HeaderFlags | TC_HEADER_FLAG_NONSYS_INPLACE_ENC, |
988 | masterCryptoInfo->SectorSize, | 988 | masterCryptoInfo->SectorSize, |
989 | wipeAlgorithm == TC_WIPE_NONE ? FALSE : (wipePass < PRAND_DISK_WIPE_PASSES - 1)); | 989 | wipeAlgorithm == TC_WIPE_NONE ? FALSE : (wipePass < PRAND_HEADER_WIPE_PASSES - 1)); |
990 | 990 | ||
991 | if (nStatus != ERR_SUCCESS) | 991 | if (nStatus != ERR_SUCCESS) |
992 | goto closing_seq; | 992 | goto closing_seq; |