1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <sal/types.h>
23 #include <cppunit/TestFixture.h>
24 #include <cppunit/extensions/HelperMacros.h>
26 #include <rtl/cipher.h>
27 #include <rtl/string.hxx>
32 class create
: public CppUnit::TestFixture
38 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmBF
, rtl_Cipher_ModeECB
);
39 #if defined LIBO_CIPHER_OPENSSL_BACKEND
40 CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher
);
42 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
43 rtl_cipher_destroy(aCipher
);
48 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmInvalid
, rtl_Cipher_ModeECB
);
49 CPPUNIT_ASSERT_EQUAL_MESSAGE("create provide wrong object.", static_cast<rtlCipher
>(nullptr), aCipher
);
53 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmBF
, rtl_Cipher_ModeCBC
);
54 #if defined LIBO_CIPHER_OPENSSL_BACKEND
55 CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher
);
57 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
58 rtl_cipher_destroy(aCipher
);
63 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmInvalid
, rtl_Cipher_ModeCBC
);
64 CPPUNIT_ASSERT_EQUAL_MESSAGE("create provide wrong object.", static_cast<rtlCipher
>(nullptr), aCipher
);
68 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmBF
, rtl_Cipher_ModeStream
);
69 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
70 rtl_cipher_destroy(aCipher
);
74 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmInvalid
, rtl_Cipher_ModeStream
);
75 CPPUNIT_ASSERT_EQUAL_MESSAGE("create provide wrong object.", static_cast<rtlCipher
>(nullptr), aCipher
);
79 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmBF
, rtl_Cipher_ModeInvalid
);
80 CPPUNIT_ASSERT_EQUAL_MESSAGE("create provide wrong object.", static_cast<rtlCipher
>(nullptr), aCipher
);
84 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmInvalid
, rtl_Cipher_ModeInvalid
);
85 CPPUNIT_ASSERT_EQUAL_MESSAGE("create provide wrong object.", static_cast<rtlCipher
>(nullptr), aCipher
);
88 // Change the following lines only, if you add, remove or rename
89 // member functions of the current class,
90 // because these macros are need by auto register mechanism.
92 CPPUNIT_TEST_SUITE(create
);
93 CPPUNIT_TEST(create_001
);
94 CPPUNIT_TEST(create_002
);
95 CPPUNIT_TEST(create_003
);
96 CPPUNIT_TEST(create_004
);
97 CPPUNIT_TEST(create_005
);
98 CPPUNIT_TEST(create_006
);
99 CPPUNIT_TEST(create_007
);
100 CPPUNIT_TEST(create_008
);
101 CPPUNIT_TEST_SUITE_END();
104 class createBF
: public CppUnit::TestFixture
110 rtlCipher aCipher
= rtl_cipher_createBF(rtl_Cipher_ModeECB
);
111 #if defined LIBO_CIPHER_OPENSSL_BACKEND
112 CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher
);
114 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
115 rtl_cipher_destroy(aCipher
);
120 rtlCipher aCipher
= rtl_cipher_createBF(rtl_Cipher_ModeCBC
);
121 #if defined LIBO_CIPHER_OPENSSL_BACKEND
122 CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher
);
124 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
125 rtl_cipher_destroy(aCipher
);
130 rtlCipher aCipher
= rtl_cipher_createBF(rtl_Cipher_ModeStream
);
131 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
132 rtl_cipher_destroy(aCipher
);
136 rtlCipher aCipher
= rtl_cipher_createBF(rtl_Cipher_ModeInvalid
);
137 CPPUNIT_ASSERT_EQUAL_MESSAGE("create provide wrong object.", static_cast<rtlCipher
>(nullptr), aCipher
);
138 // rtl_cipher_destroy(aCipher);
140 // Change the following lines only, if you add, remove or rename
141 // member functions of the current class,
142 // because these macros are need by auto register mechanism.
144 CPPUNIT_TEST_SUITE(createBF
);
145 CPPUNIT_TEST(createBF_001
);
146 CPPUNIT_TEST(createBF_002
);
147 CPPUNIT_TEST(createBF_003
);
148 CPPUNIT_TEST(createBF_004
);
149 CPPUNIT_TEST_SUITE_END();
152 class decode
: public CppUnit::TestFixture
156 void test_encode(sal_uInt8 _nKeyValue
, sal_uInt8 _nArgValue
, OString
const& _sPlainTextStr
)
158 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmBF
, rtl_Cipher_ModeECB
);
159 #if defined LIBO_CIPHER_OPENSSL_BACKEND
160 CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher
);
163 (void) _sPlainTextStr
;
165 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
167 sal_uInt32 nKeyLen
= 16;
168 sal_uInt8
*pKeyBuffer
= new sal_uInt8
[ nKeyLen
];
169 memset(pKeyBuffer
, 0, nKeyLen
);
170 pKeyBuffer
[0] = _nKeyValue
;
172 sal_uInt32 nArgLen
= 16;
173 sal_uInt8
*pArgBuffer
= new sal_uInt8
[ nArgLen
];
174 memset(pArgBuffer
, 0, nArgLen
);
175 pArgBuffer
[0] = _nArgValue
;
177 rtlCipherError aError
= rtl_cipher_init(aCipher
, rtl_Cipher_DirectionEncode
, pKeyBuffer
, nKeyLen
, pArgBuffer
, nArgLen
);
178 CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong init", rtl_Cipher_E_None
, aError
);
180 sal_uInt32 nPlainTextLen
= 16;
181 sal_uInt8
*pPlainTextBuffer
= new sal_uInt8
[ nPlainTextLen
];
182 memset(pPlainTextBuffer
, 0, nPlainTextLen
);
183 strncpy(reinterpret_cast<char*>(pPlainTextBuffer
), _sPlainTextStr
.getStr(), 16);
185 sal_uInt32 nCipherLen
= 16;
186 sal_uInt8
*pCipherBuffer
= new sal_uInt8
[ nCipherLen
];
187 memset(pCipherBuffer
, 0, nCipherLen
);
189 /* rtlCipherError */ aError
= rtl_cipher_encode(aCipher
, pPlainTextBuffer
, nPlainTextLen
, pCipherBuffer
, nCipherLen
);
190 CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong encode", rtl_Cipher_E_None
, aError
);
192 sal_uInt32 nPlainText2Len
= 16;
193 sal_uInt8
*pPlainText2Buffer
= new sal_uInt8
[ nPlainText2Len
];
194 memset(pPlainText2Buffer
, 0, nPlainText2Len
);
196 /* rtlCipherError */ aError
= rtl_cipher_decode(aCipher
, pCipherBuffer
, nCipherLen
, pPlainText2Buffer
, nPlainText2Len
);
197 CPPUNIT_ASSERT_MESSAGE("decode should not work", aError
!= rtl_Cipher_E_None
);
199 delete [] pPlainText2Buffer
;
201 delete [] pCipherBuffer
;
202 delete [] pPlainTextBuffer
;
204 delete [] pArgBuffer
;
205 delete [] pKeyBuffer
;
207 rtl_cipher_destroy(aCipher
);
211 void test_encode_and_decode(sal_uInt8 _nKeyValue
, sal_uInt8 _nArgValue
, OString
const& _sPlainTextStr
)
213 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmBF
, rtl_Cipher_ModeECB
);
214 #if defined LIBO_CIPHER_OPENSSL_BACKEND
215 CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher
);
218 (void) _sPlainTextStr
;
220 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
222 sal_uInt32 nKeyLen
= 16;
223 sal_uInt8
*pKeyBuffer
= new sal_uInt8
[ nKeyLen
];
224 memset(pKeyBuffer
, 0, nKeyLen
);
225 pKeyBuffer
[0] = _nKeyValue
;
227 sal_uInt32 nArgLen
= 16;
228 sal_uInt8
*pArgBuffer
= new sal_uInt8
[ nArgLen
];
229 memset(pArgBuffer
, 0, nArgLen
);
230 pArgBuffer
[0] = _nArgValue
;
232 rtlCipherError aError
= rtl_cipher_init(aCipher
, rtl_Cipher_DirectionBoth
, pKeyBuffer
, nKeyLen
, pArgBuffer
, nArgLen
);
233 CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong init", rtl_Cipher_E_None
, aError
);
235 sal_uInt32 nPlainTextLen
= 16;
236 sal_uInt8
*pPlainTextBuffer
= new sal_uInt8
[ nPlainTextLen
];
237 memset(pPlainTextBuffer
, 0, nPlainTextLen
);
238 strncpy(reinterpret_cast<char*>(pPlainTextBuffer
), _sPlainTextStr
.getStr(), 16);
240 sal_uInt32 nCipherLen
= 16;
241 sal_uInt8
*pCipherBuffer
= new sal_uInt8
[ nCipherLen
];
242 memset(pCipherBuffer
, 0, nCipherLen
);
244 /* rtlCipherError */ aError
= rtl_cipher_encode(aCipher
, pPlainTextBuffer
, nPlainTextLen
, pCipherBuffer
, nCipherLen
);
245 CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong encode", rtl_Cipher_E_None
, aError
);
247 sal_uInt32 nPlainText2Len
= 16;
248 sal_uInt8
*pPlainText2Buffer
= new sal_uInt8
[ nPlainText2Len
];
249 memset(pPlainText2Buffer
, 0, nPlainText2Len
);
251 /* rtlCipherError */ aError
= rtl_cipher_decode(aCipher
, pCipherBuffer
, nCipherLen
, pPlainText2Buffer
, nPlainText2Len
);
252 CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong decode", rtl_Cipher_E_None
, aError
);
254 sal_Int32 nCompare
= memcmp(pPlainTextBuffer
, pPlainText2Buffer
, 16);
256 CPPUNIT_ASSERT_EQUAL_MESSAGE("compare between plain and decoded plain failed", static_cast<sal_Int32
>(0), nCompare
);
258 delete [] pPlainText2Buffer
;
260 delete [] pCipherBuffer
;
261 delete [] pPlainTextBuffer
;
263 delete [] pArgBuffer
;
264 delete [] pKeyBuffer
;
266 rtl_cipher_destroy(aCipher
);
272 test_encode_and_decode(0,0,""_ostr
);
273 test_encode_and_decode(0,0,"hallo"_ostr
);
274 test_encode_and_decode(1,0,"B2Aahg5B"_ostr
);
275 test_encode_and_decode(1,2,"Longer text string"_ostr
);
280 test_encode(0,0,""_ostr
);
281 test_encode(0,0,"hallo"_ostr
);
282 test_encode(1,0,"B2Aahg5B"_ostr
);
283 test_encode(1,2,"Longer text string"_ostr
);
285 // Change the following lines only, if you add, remove or rename
286 // member functions of the current class,
287 // because these macros are need by auto register mechanism.
289 CPPUNIT_TEST_SUITE(decode
);
290 CPPUNIT_TEST(decode_001
);
291 CPPUNIT_TEST(decode_002
);
292 CPPUNIT_TEST_SUITE_END();
295 class decodeBF
: public CppUnit::TestFixture
302 // Change the following lines only, if you add, remove or rename
303 // member functions of the current class,
304 // because these macros are need by auto register mechanism.
306 CPPUNIT_TEST_SUITE(decodeBF
);
307 CPPUNIT_TEST(decodeBF_001
);
308 CPPUNIT_TEST_SUITE_END();
311 class destroy
: public CppUnit::TestFixture
317 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmBF
, rtl_Cipher_ModeCBC
);
318 #if defined LIBO_CIPHER_OPENSSL_BACKEND
319 CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher
);
321 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
322 rtl_cipher_destroy(aCipher
);
325 // Change the following lines only, if you add, remove or rename
326 // member functions of the current class,
327 // because these macros are need by auto register mechanism.
329 CPPUNIT_TEST_SUITE(destroy
);
330 CPPUNIT_TEST(destroy_001
);
331 CPPUNIT_TEST_SUITE_END();
334 class destroyBF
: public CppUnit::TestFixture
340 rtlCipher aCipher
= rtl_cipher_createBF(rtl_Cipher_ModeECB
);
341 #if defined LIBO_CIPHER_OPENSSL_BACKEND
342 CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher
);
344 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
345 rtl_cipher_destroyBF(aCipher
);
350 // Change the following lines only, if you add, remove or rename
351 // member functions of the current class,
352 // because these macros are need by auto register mechanism.
354 CPPUNIT_TEST_SUITE(destroyBF
);
355 CPPUNIT_TEST(destroyBF_001
);
356 CPPUNIT_TEST_SUITE_END();
357 }; // class destroyBF
359 class encode
: public CppUnit::TestFixture
363 void test_encode(sal_uInt8 _nKeyValue
, sal_uInt8 _nArgValue
, sal_uInt8 _nDataValue
)
365 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmBF
, rtl_Cipher_ModeECB
);
366 #if defined LIBO_CIPHER_OPENSSL_BACKEND
367 CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher
);
372 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
374 sal_uInt32 nKeyLen
= 16;
375 sal_uInt8
*pKeyBuffer
= new sal_uInt8
[ nKeyLen
];
376 memset(pKeyBuffer
, 0, nKeyLen
);
377 pKeyBuffer
[0] = _nKeyValue
;
379 sal_uInt32 nArgLen
= 16;
380 sal_uInt8
*pArgBuffer
= new sal_uInt8
[ nArgLen
];
381 memset(pArgBuffer
, 0, nArgLen
);
382 pArgBuffer
[0] = _nArgValue
;
384 rtlCipherError aError
= rtl_cipher_init(aCipher
, rtl_Cipher_DirectionEncode
, pKeyBuffer
, nKeyLen
, pArgBuffer
, nArgLen
);
385 CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong init", rtl_Cipher_E_None
, aError
);
387 sal_uInt32 nDataLen
= 16;
388 sal_uInt8
*pDataBuffer
= new sal_uInt8
[ nDataLen
];
389 memset(pDataBuffer
, 0, nDataLen
);
390 pDataBuffer
[0] = _nDataValue
;
392 sal_uInt32 nLen
= 16;
393 sal_uInt8
*pBuffer
= new sal_uInt8
[ nLen
];
394 memset(pBuffer
, 0, nLen
);
396 /* rtlCipherError */ aError
= rtl_cipher_encode(aCipher
, pDataBuffer
, nDataLen
, pBuffer
, nLen
);
397 CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong encode", rtl_Cipher_E_None
, aError
);
400 delete [] pDataBuffer
;
402 delete [] pArgBuffer
;
403 delete [] pKeyBuffer
;
405 rtl_cipher_destroy(aCipher
);
422 // Change the following lines only, if you add, remove or rename
423 // member functions of the current class,
424 // because these macros are need by auto register mechanism.
426 CPPUNIT_TEST_SUITE(encode
);
427 CPPUNIT_TEST(encode_001
);
428 CPPUNIT_TEST_SUITE_END();
431 class encodeBF
: public CppUnit::TestFixture
438 // Change the following lines only, if you add, remove or rename
439 // member functions of the current class,
440 // because these macros are need by auto register mechanism.
442 CPPUNIT_TEST_SUITE(encodeBF
);
443 CPPUNIT_TEST(encodeBF_001
);
444 CPPUNIT_TEST_SUITE_END();
447 class init
: public CppUnit::TestFixture
453 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmBF
, rtl_Cipher_ModeECB
);
454 #if defined LIBO_CIPHER_OPENSSL_BACKEND
455 CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher
);
457 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
459 sal_uInt32 nKeyLen
= 16;
460 sal_uInt8
*pKeyBuffer
= new sal_uInt8
[ nKeyLen
];
461 memset(pKeyBuffer
, 0, nKeyLen
);
463 sal_uInt32 nArgLen
= 16;
464 sal_uInt8
*pArgBuffer
= new sal_uInt8
[ nArgLen
];
465 memset(pArgBuffer
, 0, nArgLen
);
467 rtlCipherError aError
= rtl_cipher_init(aCipher
, rtl_Cipher_DirectionEncode
, pKeyBuffer
, nKeyLen
, pArgBuffer
, nArgLen
);
468 CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong init", rtl_Cipher_E_None
, aError
);
470 delete [] pArgBuffer
;
471 delete [] pKeyBuffer
;
473 rtl_cipher_destroy(aCipher
);
479 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmBF
, rtl_Cipher_ModeECB
);
480 #if defined LIBO_CIPHER_OPENSSL_BACKEND
481 CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher
);
483 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
485 sal_uInt32 nKeyLen
= 16;
486 sal_uInt8
*pKeyBuffer
= new sal_uInt8
[ nKeyLen
];
487 memset(pKeyBuffer
, 0, nKeyLen
);
490 sal_uInt32 nArgLen
= 16;
491 sal_uInt8
*pArgBuffer
= new sal_uInt8
[ nArgLen
];
492 memset(pArgBuffer
, 0, nArgLen
);
494 rtlCipherError aError
= rtl_cipher_init(aCipher
, rtl_Cipher_DirectionEncode
, pKeyBuffer
, nKeyLen
, pArgBuffer
, nArgLen
);
495 CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong init", rtl_Cipher_E_None
, aError
);
497 delete [] pArgBuffer
;
498 delete [] pKeyBuffer
;
500 rtl_cipher_destroy(aCipher
);
505 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmBF
, rtl_Cipher_ModeECB
);
506 #if defined LIBO_CIPHER_OPENSSL_BACKEND
507 CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher
);
509 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
511 sal_uInt32 nKeyLen
= 16;
512 sal_uInt8
*pKeyBuffer
= new sal_uInt8
[ nKeyLen
];
513 memset(pKeyBuffer
, 0, nKeyLen
);
515 sal_uInt32 nArgLen
= 16;
516 sal_uInt8
*pArgBuffer
= new sal_uInt8
[ nArgLen
];
517 memset(pArgBuffer
, 0, nArgLen
);
520 rtlCipherError aError
= rtl_cipher_init(aCipher
, rtl_Cipher_DirectionEncode
, pKeyBuffer
, nKeyLen
, pArgBuffer
, nArgLen
);
521 CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong init", rtl_Cipher_E_None
, aError
);
523 delete [] pArgBuffer
;
524 delete [] pKeyBuffer
;
526 rtl_cipher_destroy(aCipher
);
531 rtlCipher aCipher
= rtl_cipher_create(rtl_Cipher_AlgorithmBF
, rtl_Cipher_ModeECB
);
532 #if defined LIBO_CIPHER_OPENSSL_BACKEND
533 CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher
);
535 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher
!= nullptr);
537 sal_uInt32 nKeyLen
= 16;
538 sal_uInt8
*pKeyBuffer
= new sal_uInt8
[ nKeyLen
];
539 memset(pKeyBuffer
, 0, nKeyLen
);
542 sal_uInt32 nArgLen
= 16;
543 sal_uInt8
*pArgBuffer
= new sal_uInt8
[ nArgLen
];
544 memset(pArgBuffer
, 0, nArgLen
);
547 rtlCipherError aError
= rtl_cipher_init(aCipher
, rtl_Cipher_DirectionEncode
, pKeyBuffer
, nKeyLen
, pArgBuffer
, nArgLen
);
548 CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong init", rtl_Cipher_E_None
, aError
);
550 delete [] pArgBuffer
;
551 delete [] pKeyBuffer
;
553 rtl_cipher_destroy(aCipher
);
556 // Change the following lines only, if you add, remove or rename
557 // member functions of the current class,
558 // because these macros are need by auto register mechanism.
560 CPPUNIT_TEST_SUITE(init
);
561 CPPUNIT_TEST(init_001
);
562 CPPUNIT_TEST(init_002
);
563 CPPUNIT_TEST(init_003
);
564 CPPUNIT_TEST(init_004
);
565 CPPUNIT_TEST_SUITE_END();
568 class initBF
: public CppUnit::TestFixture
574 // seems to be the same as init, so empty
577 // Change the following lines only, if you add, remove or rename
578 // member functions of the current class,
579 // because these macros are need by auto register mechanism.
581 CPPUNIT_TEST_SUITE(initBF
);
582 CPPUNIT_TEST(initBF_001
);
583 CPPUNIT_TEST_SUITE_END();
586 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::create
);
587 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::createBF
);
588 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::decode
);
589 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::decodeBF
);
590 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::destroy
);
591 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::destroyBF
);
592 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::encode
);
593 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::encodeBF
);
594 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::init
);
595 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::initBF
);
597 } // namespace rtl_cipher
599 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */