diff options
Diffstat (limited to 'src/Volume/VolumeLayout.cpp')
-rw-r--r-- | src/Volume/VolumeLayout.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/Volume/VolumeLayout.cpp b/src/Volume/VolumeLayout.cpp index aeade493..a3ecab02 100644 --- a/src/Volume/VolumeLayout.cpp +++ b/src/Volume/VolumeLayout.cpp @@ -1,31 +1,29 @@ /* Copyright (c) 2008 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. */ #include "Volume/EncryptionMode.h" -#include "Volume/EncryptionModeCBC.h" -#include "Volume/EncryptionModeLRW.h" #include "Volume/EncryptionModeXTS.h" #include "VolumeLayout.h" #include "Boot/Windows/BootCommon.h" namespace VeraCrypt { VolumeLayout::VolumeLayout () { } VolumeLayout::~VolumeLayout () { } VolumeLayoutList VolumeLayout::GetAvailableLayouts (VolumeType::Enum type) { VolumeLayoutList layouts; layouts.push_back (shared_ptr <VolumeLayout> (new VolumeLayoutV2Normal ())); layouts.push_back (shared_ptr <VolumeLayout> (new VolumeLayoutV1Normal ())); @@ -56,86 +54,70 @@ namespace VeraCrypt return Header; } VolumeLayoutV1Normal::VolumeLayoutV1Normal () { Type = VolumeType::Normal; HeaderOffset = TC_VOLUME_HEADER_OFFSET; HeaderSize = TC_VOLUME_HEADER_SIZE_LEGACY; SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Serpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Twofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofishSerpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentTwofishAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new TwofishSerpent ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESBlowfish ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESBlowfishSerpent ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Blowfish ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Cast5 ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new TripleDES ())); - SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ())); - SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeLRW ())); - SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeCBC ())); } uint64 VolumeLayoutV1Normal::GetDataOffset (uint64 volumeHostSize) const { return HeaderSize; } uint64 VolumeLayoutV1Normal::GetDataSize (uint64 volumeHostSize) const { return volumeHostSize - GetHeaderSize(); } VolumeLayoutV1Hidden::VolumeLayoutV1Hidden () { Type = VolumeType::Hidden; HeaderOffset = -TC_HIDDEN_VOLUME_HEADER_OFFSET_LEGACY; HeaderSize = TC_VOLUME_HEADER_SIZE_LEGACY; SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Serpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Twofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofishSerpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentTwofishAES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new TwofishSerpent ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESBlowfish ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESBlowfishSerpent ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Blowfish ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Cast5 ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new TripleDES ())); - SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ())); - SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeLRW ())); - SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeCBC ())); } uint64 VolumeLayoutV1Hidden::GetDataOffset (uint64 volumeHostSize) const { return volumeHostSize - GetDataSize (volumeHostSize) + HeaderOffset; } uint64 VolumeLayoutV1Hidden::GetDataSize (uint64 volumeHostSize) const { return Header->GetHiddenVolumeDataSize (); } VolumeLayoutV2Normal::VolumeLayoutV2Normal () { Type = VolumeType::Normal; HeaderOffset = TC_VOLUME_HEADER_OFFSET; HeaderSize = TC_VOLUME_HEADER_SIZE; BackupHeaderOffset = -TC_VOLUME_HEADER_GROUP_SIZE; |