Fix indents in cipherunittest

This commit is contained in:
Ivan Romanov 2016-08-09 10:48:36 +05:00
parent eb5eeca609
commit 759ff45dba

View File

@ -403,8 +403,7 @@ void CipherUnitTest::aes128_cfb_data()
QTest::addColumn<QString>("ivText"); QTest::addColumn<QString>("ivText");
QTest::newRow("1") << QString("6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710") QTest::newRow("1") << QString("6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710")
<< QString("3b3fd92eb72dad20333449f8e83cfb4ac8a64537a0b3a93fcde3cdad9f1ce58b\ << QString("3b3fd92eb72dad20333449f8e83cfb4ac8a64537a0b3a93fcde3cdad9f1ce58b26751f67a3cbb140b1808cf187a4f4dfc04b05357c5d1c0eeac4c66f9ff7f2e6")
26751f67a3cbb140b1808cf187a4f4dfc04b05357c5d1c0eeac4c66f9ff7f2e6")
<< QString("2b7e151628aed2a6abf7158809cf4f3c") << QString("2b7e151628aed2a6abf7158809cf4f3c")
<< QString("000102030405060708090a0b0c0d0e0f"); << QString("000102030405060708090a0b0c0d0e0f");
} }
@ -577,7 +576,6 @@ void CipherUnitTest::aes128_ctr()
} }
} }
void CipherUnitTest::aes192_data() void CipherUnitTest::aes192_data()
{ {
QTest::addColumn<QString>("plainText"); QTest::addColumn<QString>("plainText");
@ -2484,19 +2482,19 @@ void CipherUnitTest::des_cbc_pkcs7()
} }
#if 0 #if 0
if (!QCA::isSupported("des-ecb-pkcs7") ) if (!QCA::isSupported("des-ecb-pkcs7") )
QWARN("DES, ECB mode with PKCS7 padding not supported!"); QWARN("DES, ECB mode with PKCS7 padding not supported!");
else { else {
QCA::Cipher cipherObj1( QString( "des" ), QCA::Cipher cipherObj1( QString( "des" ),
QCA::Cipher::ECB, QCA::Cipher::ECB,
QCA::Cipher::PKCS7, QCA::Cipher::PKCS7,
QCA::Encode, QCA::Encode,
QCA::SymmetricKey( 8 ) ); QCA::SymmetricKey( 8 ) );
QCOMPARE( cipherObj1.keyLength().minimum(), 8 ); QCOMPARE( cipherObj1.keyLength().minimum(), 8 );
QCOMPARE( cipherObj1.keyLength().maximum(), 8 ); QCOMPARE( cipherObj1.keyLength().maximum(), 8 );
QCOMPARE( cipherObj1.blockSize(), 8 ); QCOMPARE( cipherObj1.blockSize(), 8 );
for (int n = 0; (0 != desEcbPkcs7TestValues[n].plaintext); n++) { for (int n = 0; (0 != desEcbPkcs7TestValues[n].plaintext); n++) {
QCA::SymmetricKey key( QCA::hexToArray( desEcbPkcs7TestValues[n].key ) ); QCA::SymmetricKey key( QCA::hexToArray( desEcbPkcs7TestValues[n].key ) );
QCA::DES forwardCipher( QCA::Cipher::ECB, QCA::Cipher::PKCS7, QCA::Encode, key); QCA::DES forwardCipher( QCA::Cipher::ECB, QCA::Cipher::PKCS7, QCA::Encode, key);
QCOMPARE( QCA::arrayToHex( forwardCipher.update( QCA::hexToArray( desEcbPkcs7TestValues[n].plaintext ) ).toByteArray() ), QCOMPARE( QCA::arrayToHex( forwardCipher.update( QCA::hexToArray( desEcbPkcs7TestValues[n].plaintext ) ).toByteArray() ),
@ -2512,8 +2510,8 @@ void CipherUnitTest::des_cbc_pkcs7()
QCOMPARE( reverseCipher.ok(), true ); QCOMPARE( reverseCipher.ok(), true );
QCOMPARE( QCA::arrayToHex( reverseCipher.final().toByteArray() ), QString( "" ) ); QCOMPARE( QCA::arrayToHex( reverseCipher.final().toByteArray() ), QString( "" ) );
QCOMPARE( reverseCipher.ok(), true ); QCOMPARE( reverseCipher.ok(), true );
} }
} }
#endif #endif
// These are from the Botan test suite. They match the test vectors from Bruce's site // These are from the Botan test suite. They match the test vectors from Bruce's site