diff options
Diffstat (limited to 'src/Volume/Volume.cpp')
-rw-r--r-- | src/Volume/Volume.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/Volume/Volume.cpp b/src/Volume/Volume.cpp index aeec78e2..2c319ad9 100644 --- a/src/Volume/Volume.cpp +++ b/src/Volume/Volume.cpp @@ -1,32 +1,31 @@ /* Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved. Governed by the TrueCrypt License 3.0 the full text of which is contained in the file License.txt included in TrueCrypt binary and source code distribution packages. */ #ifndef TC_WINDOWS #include <errno.h> #endif -#include "EncryptionModeLRW.h" #include "EncryptionModeXTS.h" #include "Volume.h" #include "VolumeHeader.h" #include "VolumeLayout.h" #include "Common/Crypto.h" namespace VeraCrypt { Volume::Volume () : HiddenVolumeProtectionTriggered (false), SystemEncryption (false), VolumeDataSize (0), TopWriteOffset (0), TotalDataRead (0), TotalDataWritten (0) { } Volume::~Volume () { @@ -209,44 +208,40 @@ namespace VeraCrypt VolumeDataSize = layout->GetDataSize (VolumeHostSize); Header = header; Layout = layout; EA = header->GetEncryptionAlgorithm(); EncryptionMode &mode = *EA->GetMode(); if (layout->HasDriveHeader()) { if (header->GetEncryptedAreaLength() != header->GetVolumeDataSize()) throw VolumeEncryptionNotCompleted (SRC_POS); uint64 partitionStartOffset = VolumeFile->GetPartitionDeviceStartOffset(); if (partitionStartOffset < header->GetEncryptedAreaStart() || partitionStartOffset >= header->GetEncryptedAreaStart() + header->GetEncryptedAreaLength()) throw PasswordIncorrect (SRC_POS); mode.SetSectorOffset (partitionStartOffset / ENCRYPTION_DATA_UNIT_SIZE); } - else if (typeid (mode) == typeid (EncryptionModeLRW)) - { - mode.SetSectorOffset (VolumeDataOffset / SectorSize); - } // Volume protection if (Protection == VolumeProtection::HiddenVolumeReadOnly) { if (Type == VolumeType::Hidden) throw PasswordIncorrect (SRC_POS); else { try { Volume protectedVolume; protectedVolume.Open (VolumeFile, protectionPassword, protectionKeyfiles, VolumeProtection::ReadOnly, shared_ptr <VolumePassword> (), shared_ptr <KeyfileList> (), VolumeType::Hidden, useBackupHeaders); if (protectedVolume.GetType() != VolumeType::Hidden) |