diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-03-18 09:44:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-03-18 09:45:42 +0000 |
commit | 2c53ce5af80ea29e78be59791aa61c5d5287e297 (patch) | |
tree | 9a147fe0731aeb9c80a02cc622437af45a32a2a4 /sal/qa/rtl/cipher | |
parent | a198775260b4949fcffb46e4e87df1bf61b02046 (diff) |
quieten these tests
Diffstat (limited to 'sal/qa/rtl/cipher')
-rw-r--r-- | sal/qa/rtl/cipher/rtl_cipher.cxx | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/sal/qa/rtl/cipher/rtl_cipher.cxx b/sal/qa/rtl/cipher/rtl_cipher.cxx index 27abd0a3755d..08343d1411ba 100644 --- a/sal/qa/rtl/cipher/rtl_cipher.cxx +++ b/sal/qa/rtl/cipher/rtl_cipher.cxx @@ -211,9 +211,6 @@ public: memset(pArgBuffer, 0, nArgLen); pArgBuffer[0] = _nArgValue; - printf(" init Key: %s\n", createHex(pKeyBuffer, nKeyLen).getStr()); - printf(" init Arg: %s\n", createHex(pArgBuffer, nArgLen).getStr()); - rtlCipherError aError = rtl_cipher_init(aCipher, rtl_Cipher_DirectionEncode, pKeyBuffer, nKeyLen, pArgBuffer, nArgLen); CPPUNIT_ASSERT_MESSAGE("wrong init", aError == rtl_Cipher_E_None); @@ -229,37 +226,12 @@ public: /* rtlCipherError */ aError = rtl_cipher_encode(aCipher, pPlainTextBuffer, nPlainTextLen, pCipherBuffer, nCipherLen); CPPUNIT_ASSERT_MESSAGE("wrong encode", aError == rtl_Cipher_E_None); - printf(" Key: %s\n", createHex(pKeyBuffer, nKeyLen).getStr()); - printf(" Arg: %s\n", createHex(pArgBuffer, nArgLen).getStr()); - printf(" Plain: %s\n", createHex(pPlainTextBuffer, nPlainTextLen).getStr()); - printf( "Cipher Buf: %s\n", createHex(pCipherBuffer, nCipherLen).getStr()); - sal_uInt32 nPlainText2Len = 16; sal_uInt8 *pPlainText2Buffer = new sal_uInt8[ nPlainText2Len ]; memset(pPlainText2Buffer, 0, nPlainText2Len); /* rtlCipherError */ aError = rtl_cipher_decode(aCipher, pCipherBuffer, nCipherLen, pPlainText2Buffer, nPlainText2Len); CPPUNIT_ASSERT_MESSAGE("decode should not work", aError != rtl_Cipher_E_None); - - // rtl::OString sPlainText2Str((char*)pPlainText2Buffer, nPlainText2Len); - // printf(" Plain: %s\n", createHex(pPlainText2Buffer, nPlainText2Len).getStr()); - // printf(" ascii: %s\n", sPlainText2Str.getStr()); - // - // // printf(" Buf: %s\n", createHex(pCipherBuffer, nCipherLen).getStr()); - // - // sal_Int32 nCompare = memcmp(pPlainTextBuffer, pPlainText2Buffer, 16); - // - // CPPUNIT_ASSERT_MESSAGE("compare between plain and decoded plain failed", nCompare == 0); - // - // delete [] pPlainText2Buffer; - // - // delete [] pCipherBuffer; - // delete [] pPlainTextBuffer; - // - // delete [] pArgBuffer; - // delete [] pKeyBuffer; - // - // rtl_cipher_destroy(aCipher); } void test_encode_and_decode(sal_uInt8 _nKeyValue, sal_uInt8 _nArgValue, rtl::OString const& _sPlainTextStr) @@ -277,9 +249,6 @@ public: memset(pArgBuffer, 0, nArgLen); pArgBuffer[0] = _nArgValue; - printf(" init Key: %s\n", createHex(pKeyBuffer, nKeyLen).getStr()); - printf(" init Arg: %s\n", createHex(pArgBuffer, nArgLen).getStr()); - rtlCipherError aError = rtl_cipher_init(aCipher, rtl_Cipher_DirectionBoth, pKeyBuffer, nKeyLen, pArgBuffer, nArgLen); CPPUNIT_ASSERT_MESSAGE("wrong init", aError == rtl_Cipher_E_None); @@ -295,11 +264,6 @@ public: /* rtlCipherError */ aError = rtl_cipher_encode(aCipher, pPlainTextBuffer, nPlainTextLen, pCipherBuffer, nCipherLen); CPPUNIT_ASSERT_MESSAGE("wrong encode", aError == rtl_Cipher_E_None); - printf(" Key: %s\n", createHex(pKeyBuffer, nKeyLen).getStr()); - printf(" Arg: %s\n", createHex(pArgBuffer, nArgLen).getStr()); - printf(" Plain: %s\n", createHex(pPlainTextBuffer, nPlainTextLen).getStr()); - printf( "Cipher Buf: %s\n", createHex(pCipherBuffer, nCipherLen).getStr()); - sal_uInt32 nPlainText2Len = 16; sal_uInt8 *pPlainText2Buffer = new sal_uInt8[ nPlainText2Len ]; memset(pPlainText2Buffer, 0, nPlainText2Len); @@ -308,10 +272,6 @@ public: CPPUNIT_ASSERT_MESSAGE("wrong decode", aError == rtl_Cipher_E_None); rtl::OString sPlainText2Str((char*)pPlainText2Buffer, nPlainText2Len); - printf(" Plain: %s\n", createHex(pPlainText2Buffer, nPlainText2Len).getStr()); - printf(" as ascii: %s\n", sPlainText2Str.getStr()); - - // printf(" Buf: %s\n", createHex(pCipherBuffer, nCipherLen).getStr()); sal_Int32 nCompare = memcmp(pPlainTextBuffer, pPlainText2Buffer, 16); @@ -460,9 +420,6 @@ public: memset(pArgBuffer, 0, nArgLen); pArgBuffer[0] = _nArgValue; - printf("init Key: %s\n", createHex(pKeyBuffer, nKeyLen).getStr()); - printf("init Arg: %s\n", createHex(pArgBuffer, nArgLen).getStr()); - rtlCipherError aError = rtl_cipher_init(aCipher, rtl_Cipher_DirectionEncode, pKeyBuffer, nKeyLen, pArgBuffer, nArgLen); CPPUNIT_ASSERT_MESSAGE("wrong init", aError == rtl_Cipher_E_None); @@ -478,11 +435,6 @@ public: /* rtlCipherError */ aError = rtl_cipher_encode(aCipher, pDataBuffer, nDataLen, pBuffer, nLen); CPPUNIT_ASSERT_MESSAGE("wrong encode", aError == rtl_Cipher_E_None); - printf(" Key: %s\n", createHex(pKeyBuffer, nKeyLen).getStr()); - printf(" Arg: %s\n", createHex(pArgBuffer, nArgLen).getStr()); - printf("Data: %s\n", createHex(pDataBuffer, nDataLen).getStr()); - printf(" Buf: %s\n", createHex(pBuffer, nLen).getStr()); - delete [] pBuffer; delete [] pDataBuffer; @@ -563,15 +515,9 @@ public: sal_uInt8 *pArgBuffer = new sal_uInt8[ nArgLen ]; memset(pArgBuffer, 0, nArgLen); - printf("Key: %s\n", createHex(pKeyBuffer, nKeyLen).getStr()); - printf("Arg: %s\n", createHex(pArgBuffer, nArgLen).getStr()); - rtlCipherError aError = rtl_cipher_init(aCipher, rtl_Cipher_DirectionEncode, pKeyBuffer, nKeyLen, pArgBuffer, nArgLen); CPPUNIT_ASSERT_MESSAGE("wrong init", aError == rtl_Cipher_E_None); - printf("Key: %s\n", createHex(pKeyBuffer, nKeyLen).getStr()); - printf("Arg: %s\n", createHex(pArgBuffer, nArgLen).getStr()); - delete [] pArgBuffer; delete [] pKeyBuffer; @@ -592,15 +538,9 @@ public: sal_uInt8 *pArgBuffer = new sal_uInt8[ nArgLen ]; memset(pArgBuffer, 0, nArgLen); - printf("Key: %s\n", createHex(pKeyBuffer, nKeyLen).getStr()); - printf("Arg: %s\n", createHex(pArgBuffer, nArgLen).getStr()); - rtlCipherError aError = rtl_cipher_init(aCipher, rtl_Cipher_DirectionEncode, pKeyBuffer, nKeyLen, pArgBuffer, nArgLen); CPPUNIT_ASSERT_MESSAGE("wrong init", aError == rtl_Cipher_E_None); - printf("Key: %s\n", createHex(pKeyBuffer, nKeyLen).getStr()); - printf("Arg: %s\n", createHex(pArgBuffer, nArgLen).getStr()); - delete [] pArgBuffer; delete [] pKeyBuffer; @@ -620,15 +560,9 @@ public: memset(pArgBuffer, 0, nArgLen); pArgBuffer[0] = 1; - printf("Key: %s\n", createHex(pKeyBuffer, nKeyLen).getStr()); - printf("Arg: %s\n", createHex(pArgBuffer, nArgLen).getStr()); - rtlCipherError aError = rtl_cipher_init(aCipher, rtl_Cipher_DirectionEncode, pKeyBuffer, nKeyLen, pArgBuffer, nArgLen); CPPUNIT_ASSERT_MESSAGE("wrong init", aError == rtl_Cipher_E_None); - printf("Key: %s\n", createHex(pKeyBuffer, nKeyLen).getStr()); - printf("Arg: %s\n", createHex(pArgBuffer, nArgLen).getStr()); - delete [] pArgBuffer; delete [] pKeyBuffer; @@ -649,15 +583,9 @@ public: memset(pArgBuffer, 0, nArgLen); pArgBuffer[0] = 1; - printf("Key: %s\n", createHex(pKeyBuffer, nKeyLen).getStr()); - printf("Arg: %s\n", createHex(pArgBuffer, nArgLen).getStr()); - rtlCipherError aError = rtl_cipher_init(aCipher, rtl_Cipher_DirectionEncode, pKeyBuffer, nKeyLen, pArgBuffer, nArgLen); CPPUNIT_ASSERT_MESSAGE("wrong init", aError == rtl_Cipher_E_None); - printf("Key: %s\n", createHex(pKeyBuffer, nKeyLen).getStr()); - printf("Arg: %s\n", createHex(pArgBuffer, nArgLen).getStr()); - delete [] pArgBuffer; delete [] pKeyBuffer; |