Version 4.2.0.1, tag libreoffice-4.2.0.1
[LibreOffice.git] / sal / qa / rtl / cipher / rtl_cipher.cxx
blob18b1f51345773f6a2f57ca3f1c086364a537d49b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #include <cstring>
22 #include <sal/types.h>
23 #include <cppunit/TestFixture.h>
24 #include <cppunit/extensions/HelperMacros.h>
25 #include <cppunit/plugin/TestPlugIn.h>
27 #include <rtl/strbuf.hxx>
28 #include <rtl/cipher.h>
30 // -----------------------------------------------------------------------------
31 namespace rtl_cipher
34 class create : public CppUnit::TestFixture
36 public:
37 // initialise your test code values here.
38 void setUp()
42 void tearDown()
46 void create_001()
48 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB);
49 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
50 rtl_cipher_destroy(aCipher);
52 void create_002()
54 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmInvalid, rtl_Cipher_ModeECB);
55 CPPUNIT_ASSERT_MESSAGE("create provide wrong object.", aCipher == NULL);
57 void create_003()
59 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeCBC);
60 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
61 rtl_cipher_destroy(aCipher);
63 void create_004()
65 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmInvalid, rtl_Cipher_ModeCBC);
66 CPPUNIT_ASSERT_MESSAGE("create provide wrong object.", aCipher == NULL);
68 void create_005()
70 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeStream);
71 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
72 rtl_cipher_destroy(aCipher);
74 void create_006()
76 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmInvalid, rtl_Cipher_ModeStream);
77 CPPUNIT_ASSERT_MESSAGE("create provide wrong object.", aCipher == NULL);
79 void create_007()
81 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeInvalid);
82 CPPUNIT_ASSERT_MESSAGE("create provide wrong object.", aCipher == NULL);
84 void create_008()
86 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmInvalid, rtl_Cipher_ModeInvalid);
87 CPPUNIT_ASSERT_MESSAGE("create provide wrong object.", aCipher == NULL);
90 // Change the following lines only, if you add, remove or rename
91 // member functions of the current class,
92 // because these macros are need by auto register mechanism.
94 CPPUNIT_TEST_SUITE(create);
95 CPPUNIT_TEST(create_001);
96 CPPUNIT_TEST(create_002);
97 CPPUNIT_TEST(create_003);
98 CPPUNIT_TEST(create_004);
99 CPPUNIT_TEST(create_005);
100 CPPUNIT_TEST(create_006);
101 CPPUNIT_TEST(create_007);
102 CPPUNIT_TEST(create_008);
103 CPPUNIT_TEST_SUITE_END();
104 }; // class create
106 // -----------------------------------------------------------------------------
107 class createBF : public CppUnit::TestFixture
109 public:
110 // initialise your test code values here.
111 void setUp()
115 void tearDown()
119 void createBF_001()
121 rtlCipher aCipher = rtl_cipher_createBF(rtl_Cipher_ModeECB);
122 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
123 rtl_cipher_destroy(aCipher);
125 void createBF_002()
127 rtlCipher aCipher = rtl_cipher_createBF(rtl_Cipher_ModeCBC);
128 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
129 rtl_cipher_destroy(aCipher);
131 void createBF_003()
133 rtlCipher aCipher = rtl_cipher_createBF(rtl_Cipher_ModeStream);
134 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
135 rtl_cipher_destroy(aCipher);
137 void createBF_004()
139 rtlCipher aCipher = rtl_cipher_createBF(rtl_Cipher_ModeInvalid);
140 CPPUNIT_ASSERT_MESSAGE("create provide wrong object.", aCipher == NULL);
141 // rtl_cipher_destroy(aCipher);
143 // Change the following lines only, if you add, remove or rename
144 // member functions of the current class,
145 // because these macros are need by auto register mechanism.
147 CPPUNIT_TEST_SUITE(createBF);
148 CPPUNIT_TEST(createBF_001);
149 CPPUNIT_TEST(createBF_002);
150 CPPUNIT_TEST(createBF_003);
151 CPPUNIT_TEST(createBF_004);
152 CPPUNIT_TEST_SUITE_END();
153 }; // class createBF
154 // -----------------------------------------------------------------------------
155 class decode : public CppUnit::TestFixture
157 public:
158 // initialise your test code values here.
159 void setUp()
163 void tearDown()
167 void test_encode(sal_uInt8 _nKeyValue, sal_uInt8 _nArgValue, rtl::OString const& _sPlainTextStr)
169 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB);
170 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
172 sal_uInt32 nKeyLen = 16;
173 sal_uInt8 *pKeyBuffer = new sal_uInt8[ nKeyLen ];
174 memset(pKeyBuffer, 0, nKeyLen);
175 pKeyBuffer[0] = _nKeyValue;
177 sal_uInt32 nArgLen = 16;
178 sal_uInt8 *pArgBuffer = new sal_uInt8[ nArgLen ];
179 memset(pArgBuffer, 0, nArgLen);
180 pArgBuffer[0] = _nArgValue;
182 rtlCipherError aError = rtl_cipher_init(aCipher, rtl_Cipher_DirectionEncode, pKeyBuffer, nKeyLen, pArgBuffer, nArgLen);
183 CPPUNIT_ASSERT_MESSAGE("wrong init", aError == rtl_Cipher_E_None);
185 sal_uInt32 nPlainTextLen = 16;
186 sal_uInt8 *pPlainTextBuffer = new sal_uInt8[ nPlainTextLen ];
187 memset(pPlainTextBuffer, 0, nPlainTextLen);
188 strncpy((char*)pPlainTextBuffer, _sPlainTextStr.getStr(), 16);
190 sal_uInt32 nCipherLen = 16;
191 sal_uInt8 *pCipherBuffer = new sal_uInt8[ nCipherLen ];
192 memset(pCipherBuffer, 0, nCipherLen);
194 /* rtlCipherError */ aError = rtl_cipher_encode(aCipher, pPlainTextBuffer, nPlainTextLen, pCipherBuffer, nCipherLen);
195 CPPUNIT_ASSERT_MESSAGE("wrong encode", aError == rtl_Cipher_E_None);
197 sal_uInt32 nPlainText2Len = 16;
198 sal_uInt8 *pPlainText2Buffer = new sal_uInt8[ nPlainText2Len ];
199 memset(pPlainText2Buffer, 0, nPlainText2Len);
201 /* rtlCipherError */ aError = rtl_cipher_decode(aCipher, pCipherBuffer, nCipherLen, pPlainText2Buffer, nPlainText2Len);
202 CPPUNIT_ASSERT_MESSAGE("decode should not work", aError != rtl_Cipher_E_None);
204 delete [] pPlainText2Buffer;
206 delete [] pCipherBuffer;
207 delete [] pPlainTextBuffer;
209 delete [] pArgBuffer;
210 delete [] pKeyBuffer;
212 rtl_cipher_destroy(aCipher);
215 void test_encode_and_decode(sal_uInt8 _nKeyValue, sal_uInt8 _nArgValue, rtl::OString const& _sPlainTextStr)
217 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB);
218 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
220 sal_uInt32 nKeyLen = 16;
221 sal_uInt8 *pKeyBuffer = new sal_uInt8[ nKeyLen ];
222 memset(pKeyBuffer, 0, nKeyLen);
223 pKeyBuffer[0] = _nKeyValue;
225 sal_uInt32 nArgLen = 16;
226 sal_uInt8 *pArgBuffer = new sal_uInt8[ nArgLen ];
227 memset(pArgBuffer, 0, nArgLen);
228 pArgBuffer[0] = _nArgValue;
230 rtlCipherError aError = rtl_cipher_init(aCipher, rtl_Cipher_DirectionBoth, pKeyBuffer, nKeyLen, pArgBuffer, nArgLen);
231 CPPUNIT_ASSERT_MESSAGE("wrong init", aError == rtl_Cipher_E_None);
233 sal_uInt32 nPlainTextLen = 16;
234 sal_uInt8 *pPlainTextBuffer = new sal_uInt8[ nPlainTextLen ];
235 memset(pPlainTextBuffer, 0, nPlainTextLen);
236 strncpy((char*)pPlainTextBuffer, _sPlainTextStr.getStr(), 16);
238 sal_uInt32 nCipherLen = 16;
239 sal_uInt8 *pCipherBuffer = new sal_uInt8[ nCipherLen ];
240 memset(pCipherBuffer, 0, nCipherLen);
242 /* rtlCipherError */ aError = rtl_cipher_encode(aCipher, pPlainTextBuffer, nPlainTextLen, pCipherBuffer, nCipherLen);
243 CPPUNIT_ASSERT_MESSAGE("wrong encode", aError == rtl_Cipher_E_None);
245 sal_uInt32 nPlainText2Len = 16;
246 sal_uInt8 *pPlainText2Buffer = new sal_uInt8[ nPlainText2Len ];
247 memset(pPlainText2Buffer, 0, nPlainText2Len);
249 /* rtlCipherError */ aError = rtl_cipher_decode(aCipher, pCipherBuffer, nCipherLen, pPlainText2Buffer, nPlainText2Len);
250 CPPUNIT_ASSERT_MESSAGE("wrong decode", aError == rtl_Cipher_E_None);
252 sal_Int32 nCompare = memcmp(pPlainTextBuffer, pPlainText2Buffer, 16);
254 CPPUNIT_ASSERT_MESSAGE("compare between plain and decoded plain failed", nCompare == 0);
256 delete [] pPlainText2Buffer;
258 delete [] pCipherBuffer;
259 delete [] pPlainTextBuffer;
261 delete [] pArgBuffer;
262 delete [] pKeyBuffer;
264 rtl_cipher_destroy(aCipher);
267 void decode_001()
269 test_encode_and_decode(0,0,"");
270 test_encode_and_decode(0,0,"hallo");
271 test_encode_and_decode(1,0,"B2Aahg5B");
272 test_encode_and_decode(1,2,"Longer text string");
275 void decode_002()
277 test_encode(0,0,"");
278 test_encode(0,0,"hallo");
279 test_encode(1,0,"B2Aahg5B");
280 test_encode(1,2,"Longer text string");
282 // Change the following lines only, if you add, remove or rename
283 // member functions of the current class,
284 // because these macros are need by auto register mechanism.
286 CPPUNIT_TEST_SUITE(decode);
287 CPPUNIT_TEST(decode_001);
288 CPPUNIT_TEST(decode_002);
289 CPPUNIT_TEST_SUITE_END();
290 }; // class decode
291 // -----------------------------------------------------------------------------
292 class decodeBF : public CppUnit::TestFixture
294 public:
295 // initialise your test code values here.
296 void setUp()
300 void tearDown()
304 void decodeBF_001()
307 // Change the following lines only, if you add, remove or rename
308 // member functions of the current class,
309 // because these macros are need by auto register mechanism.
311 CPPUNIT_TEST_SUITE(decodeBF);
312 CPPUNIT_TEST(decodeBF_001);
313 CPPUNIT_TEST_SUITE_END();
314 }; // class decodeBF
315 // -----------------------------------------------------------------------------
316 class destroy : public CppUnit::TestFixture
318 public:
319 // initialise your test code values here.
320 void setUp()
324 void tearDown()
328 void destroy_001()
330 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeCBC);
331 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
332 rtl_cipher_destroy(aCipher);
334 // Change the following lines only, if you add, remove or rename
335 // member functions of the current class,
336 // because these macros are need by auto register mechanism.
338 CPPUNIT_TEST_SUITE(destroy);
339 CPPUNIT_TEST(destroy_001);
340 CPPUNIT_TEST_SUITE_END();
341 }; // class destroy
342 // -----------------------------------------------------------------------------
343 class destroyBF : public CppUnit::TestFixture
345 public:
346 // initialise your test code values here.
347 void setUp()
351 void tearDown()
355 void destroyBF_001()
357 rtlCipher aCipher = rtl_cipher_createBF(rtl_Cipher_ModeECB);
358 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
359 rtl_cipher_destroyBF(aCipher);
360 // more proforma
361 // should not GPF
363 // Change the following lines only, if you add, remove or rename
364 // member functions of the current class,
365 // because these macros are need by auto register mechanism.
367 CPPUNIT_TEST_SUITE(destroyBF);
368 CPPUNIT_TEST(destroyBF_001);
369 CPPUNIT_TEST_SUITE_END();
370 }; // class destroyBF
371 // -----------------------------------------------------------------------------
372 class encode : public CppUnit::TestFixture
374 public:
375 // initialise your test code values here.
376 void setUp()
380 void tearDown()
384 void test_encode(sal_uInt8 _nKeyValue, sal_uInt8 _nArgValue, sal_uInt8 _nDataValue)
386 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB);
387 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
389 sal_uInt32 nKeyLen = 16;
390 sal_uInt8 *pKeyBuffer = new sal_uInt8[ nKeyLen ];
391 memset(pKeyBuffer, 0, nKeyLen);
392 pKeyBuffer[0] = _nKeyValue;
394 sal_uInt32 nArgLen = 16;
395 sal_uInt8 *pArgBuffer = new sal_uInt8[ nArgLen ];
396 memset(pArgBuffer, 0, nArgLen);
397 pArgBuffer[0] = _nArgValue;
399 rtlCipherError aError = rtl_cipher_init(aCipher, rtl_Cipher_DirectionEncode, pKeyBuffer, nKeyLen, pArgBuffer, nArgLen);
400 CPPUNIT_ASSERT_MESSAGE("wrong init", aError == rtl_Cipher_E_None);
402 sal_uInt32 nDataLen = 16;
403 sal_uInt8 *pDataBuffer = new sal_uInt8[ nDataLen ];
404 memset(pDataBuffer, 0, nDataLen);
405 pDataBuffer[0] = _nDataValue;
407 sal_uInt32 nLen = 16;
408 sal_uInt8 *pBuffer = new sal_uInt8[ nLen ];
409 memset(pBuffer, 0, nLen);
411 /* rtlCipherError */ aError = rtl_cipher_encode(aCipher, pDataBuffer, nDataLen, pBuffer, nLen);
412 CPPUNIT_ASSERT_MESSAGE("wrong encode", aError == rtl_Cipher_E_None);
414 delete [] pBuffer;
415 delete [] pDataBuffer;
417 delete [] pArgBuffer;
418 delete [] pKeyBuffer;
420 rtl_cipher_destroy(aCipher);
423 void encode_001()
425 test_encode(0,0,0);
426 test_encode(1,0,0);
427 test_encode(0,1,0);
428 test_encode(1,1,0);
430 test_encode(0,0,1);
431 test_encode(1,0,1);
432 test_encode(0,1,1);
433 test_encode(1,1,1);
436 // Change the following lines only, if you add, remove or rename
437 // member functions of the current class,
438 // because these macros are need by auto register mechanism.
440 CPPUNIT_TEST_SUITE(encode);
441 CPPUNIT_TEST(encode_001);
442 CPPUNIT_TEST_SUITE_END();
443 }; // class encode
444 // -----------------------------------------------------------------------------
445 class encodeBF : public CppUnit::TestFixture
447 public:
448 // initialise your test code values here.
449 void setUp()
453 void tearDown()
457 void encodeBF_001()
460 // Change the following lines only, if you add, remove or rename
461 // member functions of the current class,
462 // because these macros are need by auto register mechanism.
464 CPPUNIT_TEST_SUITE(encodeBF);
465 CPPUNIT_TEST(encodeBF_001);
466 CPPUNIT_TEST_SUITE_END();
467 }; // class encodeBF
468 // -----------------------------------------------------------------------------
469 class init : public CppUnit::TestFixture
471 public:
472 // initialise your test code values here.
473 void setUp()
477 void tearDown()
481 void init_001()
483 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB);
484 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
486 sal_uInt32 nKeyLen = 16;
487 sal_uInt8 *pKeyBuffer = new sal_uInt8[ nKeyLen ];
488 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_MESSAGE("wrong init", aError == rtl_Cipher_E_None);
497 delete [] pArgBuffer;
498 delete [] pKeyBuffer;
500 rtl_cipher_destroy(aCipher);
503 void init_002()
505 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB);
506 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
508 sal_uInt32 nKeyLen = 16;
509 sal_uInt8 *pKeyBuffer = new sal_uInt8[ nKeyLen ];
510 memset(pKeyBuffer, 0, nKeyLen);
511 pKeyBuffer[0] = 1;
513 sal_uInt32 nArgLen = 16;
514 sal_uInt8 *pArgBuffer = new sal_uInt8[ nArgLen ];
515 memset(pArgBuffer, 0, nArgLen);
517 rtlCipherError aError = rtl_cipher_init(aCipher, rtl_Cipher_DirectionEncode, pKeyBuffer, nKeyLen, pArgBuffer, nArgLen);
518 CPPUNIT_ASSERT_MESSAGE("wrong init", aError == rtl_Cipher_E_None);
520 delete [] pArgBuffer;
521 delete [] pKeyBuffer;
523 rtl_cipher_destroy(aCipher);
525 void init_003()
527 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB);
528 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
530 sal_uInt32 nKeyLen = 16;
531 sal_uInt8 *pKeyBuffer = new sal_uInt8[ nKeyLen ];
532 memset(pKeyBuffer, 0, nKeyLen);
534 sal_uInt32 nArgLen = 16;
535 sal_uInt8 *pArgBuffer = new sal_uInt8[ nArgLen ];
536 memset(pArgBuffer, 0, nArgLen);
537 pArgBuffer[0] = 1;
539 rtlCipherError aError = rtl_cipher_init(aCipher, rtl_Cipher_DirectionEncode, pKeyBuffer, nKeyLen, pArgBuffer, nArgLen);
540 CPPUNIT_ASSERT_MESSAGE("wrong init", aError == rtl_Cipher_E_None);
542 delete [] pArgBuffer;
543 delete [] pKeyBuffer;
545 rtl_cipher_destroy(aCipher);
547 void init_004()
549 rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB);
550 CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != NULL);
552 sal_uInt32 nKeyLen = 16;
553 sal_uInt8 *pKeyBuffer = new sal_uInt8[ nKeyLen ];
554 memset(pKeyBuffer, 0, nKeyLen);
555 pKeyBuffer[0] = 1;
557 sal_uInt32 nArgLen = 16;
558 sal_uInt8 *pArgBuffer = new sal_uInt8[ nArgLen ];
559 memset(pArgBuffer, 0, nArgLen);
560 pArgBuffer[0] = 1;
562 rtlCipherError aError = rtl_cipher_init(aCipher, rtl_Cipher_DirectionEncode, pKeyBuffer, nKeyLen, pArgBuffer, nArgLen);
563 CPPUNIT_ASSERT_MESSAGE("wrong init", aError == rtl_Cipher_E_None);
565 delete [] pArgBuffer;
566 delete [] pKeyBuffer;
568 rtl_cipher_destroy(aCipher);
570 // Change the following lines only, if you add, remove or rename
571 // member functions of the current class,
572 // because these macros are need by auto register mechanism.
574 CPPUNIT_TEST_SUITE(init);
575 CPPUNIT_TEST(init_001);
576 CPPUNIT_TEST(init_002);
577 CPPUNIT_TEST(init_003);
578 CPPUNIT_TEST(init_004);
579 CPPUNIT_TEST_SUITE_END();
580 }; // class init
581 // -----------------------------------------------------------------------------
582 class initBF : public CppUnit::TestFixture
584 public:
585 // initialise your test code values here.
586 void setUp()
590 void tearDown()
594 void initBF_001()
596 // seems to be the same as init, so empty
599 // Change the following lines only, if you add, remove or rename
600 // member functions of the current class,
601 // because these macros are need by auto register mechanism.
603 CPPUNIT_TEST_SUITE(initBF);
604 CPPUNIT_TEST(initBF_001);
605 CPPUNIT_TEST_SUITE_END();
606 }; // class initBF
608 // -----------------------------------------------------------------------------
610 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::create);
611 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::createBF);
612 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::decode);
613 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::decodeBF);
614 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::destroy);
615 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::destroyBF);
616 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::encode);
617 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::encodeBF);
618 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::init);
619 CPPUNIT_TEST_SUITE_REGISTRATION(rtl_cipher::initBF);
621 } // namespace rtl_cipher
624 // -----------------------------------------------------------------------------
626 // this macro creates an empty function, which will called by the RegisterAllFunctions()
627 // to let the user the possibility to also register some functions by hand.
628 CPPUNIT_PLUGIN_IMPLEMENT();
630 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */