/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
// Change the following lines only, if you add, remove or rename // member functions of the current class, // because these macros are need by auto register mechanism.
void decode_001()
{
test_encode_and_decode(0,0,""_ostr);
test_encode_and_decode(0,0,"hallo"_ostr);
test_encode_and_decode(1,0,"B2Aahg5B"_ostr);
test_encode_and_decode(1,2,"Longer text string"_ostr);
}
void decode_002()
{
test_encode(0,0,""_ostr);
test_encode(0,0,"hallo"_ostr);
test_encode(1,0,"B2Aahg5B"_ostr);
test_encode(1,2,"Longer text string"_ostr);
} // Change the following lines only, if you add, remove or rename // member functions of the current class, // because these macros are need by auto register mechanism.
CPPUNIT_TEST_SUITE(decode);
CPPUNIT_TEST(decode_001);
CPPUNIT_TEST(decode_002);
CPPUNIT_TEST_SUITE_END();
}; // class decode
class decodeBF : public CppUnit::TestFixture
{ public:
void decodeBF_001()
{
} // Change the following lines only, if you add, remove or rename // member functions of the current class, // because these macros are need by auto register mechanism.
CPPUNIT_TEST_SUITE(decodeBF);
CPPUNIT_TEST(decodeBF_001);
CPPUNIT_TEST_SUITE_END();
}; // class decodeBF
class destroy : public CppUnit::TestFixture
{ public:
void destroy_001()
{
rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeCBC); #ifdefined LIBO_CIPHER_OPENSSL_BACKEND
CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); #else
CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr);
rtl_cipher_destroy(aCipher); #endif
} // Change the following lines only, if you add, remove or rename // member functions of the current class, // because these macros are need by auto register mechanism.
CPPUNIT_TEST_SUITE(destroy);
CPPUNIT_TEST(destroy_001);
CPPUNIT_TEST_SUITE_END();
}; // class destroy
class destroyBF : public CppUnit::TestFixture
{ public:
void destroyBF_001()
{
rtlCipher aCipher = rtl_cipher_createBF(rtl_Cipher_ModeECB); #ifdefined LIBO_CIPHER_OPENSSL_BACKEND
CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); #else
CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr);
rtl_cipher_destroyBF(aCipher); // more proforma // should not GPF #endif
} // Change the following lines only, if you add, remove or rename // member functions of the current class, // because these macros are need by auto register mechanism.
CPPUNIT_TEST_SUITE(destroyBF);
CPPUNIT_TEST(destroyBF_001);
CPPUNIT_TEST_SUITE_END();
}; // class destroyBF
class encode : public CppUnit::TestFixture
{ public:
// Change the following lines only, if you add, remove or rename // member functions of the current class, // because these macros are need by auto register mechanism.
CPPUNIT_TEST_SUITE(encode);
CPPUNIT_TEST(encode_001);
CPPUNIT_TEST_SUITE_END();
}; // class encode
class encodeBF : public CppUnit::TestFixture
{ public:
void encodeBF_001()
{
} // Change the following lines only, if you add, remove or rename // member functions of the current class, // because these macros are need by auto register mechanism.
CPPUNIT_TEST_SUITE(encodeBF);
CPPUNIT_TEST(encodeBF_001);
CPPUNIT_TEST_SUITE_END();
}; // class encodeBF
class init : public CppUnit::TestFixture
{ public:
rtl_cipher_destroy(aCipher); #endif
} // Change the following lines only, if you add, remove or rename // member functions of the current class, // because these macros are need by auto register mechanism.
CPPUNIT_TEST_SUITE(init);
CPPUNIT_TEST(init_001);
CPPUNIT_TEST(init_002);
CPPUNIT_TEST(init_003);
CPPUNIT_TEST(init_004);
CPPUNIT_TEST_SUITE_END();
}; // class init
class initBF : public CppUnit::TestFixture
{ public:
void initBF_001()
{ // seems to be the same as init, so empty
}
// Change the following lines only, if you add, remove or rename // member functions of the current class, // because these macros are need by auto register mechanism.
CPPUNIT_TEST_SUITE(initBF);
CPPUNIT_TEST(initBF_001);
CPPUNIT_TEST_SUITE_END();
}; // class initBF
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.