diff options
Diffstat (limited to 'src/Volume/EncryptionTest.cpp')
-rw-r--r-- | src/Volume/EncryptionTest.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Volume/EncryptionTest.cpp b/src/Volume/EncryptionTest.cpp index c900885e..9009be66 100644 --- a/src/Volume/EncryptionTest.cpp +++ b/src/Volume/EncryptionTest.cpp @@ -46,9 +46,9 @@ namespace VeraCrypt struct CipherTestVector { - byte Key[32]; - byte Plaintext[16]; - byte Ciphertext[16]; + uint8 Key[32]; + uint8 Plaintext[16]; + uint8 Ciphertext[16]; }; static const CipherTestVector AESTestVectors[] = @@ -179,7 +179,7 @@ namespace VeraCrypt Buffer testData (1024); for (size_t i = 0; i < testData.Size(); ++i) { - testData[i] = (byte) i; + testData[i] = (uint8) i; } uint32 origCrc = Crc32::ProcessBuffer (testData); @@ -485,7 +485,7 @@ namespace VeraCrypt int testCase = 0; int nTestsPerformed = 0; - static const byte testKey[] = + static const uint8 testKey[] = { 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45, 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26, 0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69, 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27, 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95, 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37, 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92, @@ -521,7 +521,7 @@ namespace VeraCrypt Buffer modeKey (ea.GetKeySize()); for (size_t mi = 0; mi < modeKey.Size(); mi++) - modeKey[mi] = (byte) mi; + modeKey[mi] = (uint8) mi; modeKey.CopyFrom (ConstBufferPtr (XtsTestVectors[array_capacity (XtsTestVectors)-1].key2, sizeof (XtsTestVectors[array_capacity (XtsTestVectors)-1].key2))); mode->SetKey (modeKey); @@ -976,7 +976,7 @@ namespace VeraCrypt Buffer modeKey (ea.GetKeySize()); for (size_t mi = 0; mi < modeKey.Size(); mi++) - modeKey[mi] = (byte) mi; + modeKey[mi] = (uint8) mi; modeKey.CopyFrom (ConstBufferPtr (XtsTestVectors[array_capacity (XtsTestVectors)-1].key2, sizeof (XtsTestVectors[array_capacity (XtsTestVectors)-1].key2))); mode->SetKey (modeKey); @@ -1110,8 +1110,8 @@ namespace VeraCrypt void EncryptionTest::TestPkcs5 () { - VolumePassword password ((byte*) "password", 8); - static const byte saltData[] = { 0x12, 0x34, 0x56, 0x78 }; + VolumePassword password ((uint8*) "password", 8); + static const uint8 saltData[] = { 0x12, 0x34, 0x56, 0x78 }; ConstBufferPtr salt (saltData, sizeof (saltData)); Buffer derivedKey (4); |