1/**
2 * Copyright (C) 2004-2007 Brad Hards <bradh@frogmouth.net>
3 * Copyright (C) 2013-2016 Ivan Romanov <drizt@land.ru>
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#ifndef CIPHERUNITTEST_H
28#define CIPHERUNITTEST_H
29
30#include <QtCrypto>
31
32class CipherUnitTest : public QObject
33{
34 Q_OBJECT
35
36private Q_SLOTS:
37 void initTestCase();
38 void cleanupTestCase();
39 void aes128_data();
40 void aes128();
41 void aes128_cbc_data();
42 void aes128_cbc();
43 void aes128_cbc_pkcs7_data();
44 void aes128_cbc_pkcs7();
45 void aes128_cfb_data();
46 void aes128_cfb();
47 void aes128_ofb_data();
48 void aes128_ofb();
49 void aes128_ctr_data();
50 void aes128_ctr();
51 void aes128_gcm_data();
52 void aes128_gcm();
53 void aes128_ccm_data();
54 void aes128_ccm();
55
56 void aes192_data();
57 void aes192();
58 void aes192_cbc_data();
59 void aes192_cbc();
60 void aes192_cbc_pkcs7_data();
61 void aes192_cbc_pkcs7();
62 void aes192_cfb_data();
63 void aes192_cfb();
64 void aes192_ofb_data();
65 void aes192_ofb();
66 void aes192_ctr_data();
67 void aes192_ctr();
68 void aes192_gcm_data();
69 void aes192_gcm();
70 void aes192_ccm_data();
71 void aes192_ccm();
72
73 void aes256_data();
74 void aes256();
75 void aes256_cbc_data();
76 void aes256_cbc();
77 void aes256_cbc_pkcs7_data();
78 void aes256_cbc_pkcs7();
79 void aes256_cfb_data();
80 void aes256_cfb();
81 void aes256_ofb_data();
82 void aes256_ofb();
83 void aes256_ctr_data();
84 void aes256_ctr();
85 void aes256_gcm_data();
86 void aes256_gcm();
87 void aes256_ccm_data();
88 void aes256_ccm();
89
90 void tripleDES_data();
91 void tripleDES();
92
93 void des_data();
94 void des();
95 void des_pkcs7_data();
96 void des_pkcs7();
97 void des_cbc_data();
98 void des_cbc();
99 void des_cbc_pkcs7_data();
100 void des_cbc_pkcs7();
101 void des_cfb_data();
102 void des_cfb();
103 void des_ofb_data();
104 void des_ofb();
105
106 void blowfish_data();
107 void blowfish();
108 void blowfish_cbc_data();
109 void blowfish_cbc();
110 void blowfish_cbc_pkcs7_data();
111 void blowfish_cbc_pkcs7();
112 void blowfish_cfb_data();
113 void blowfish_cfb();
114 void blowfish_ofb_data();
115 void blowfish_ofb();
116
117 void cast5_data();
118 void cast5();
119
120private:
121 QCA::Initializer *m_init;
122 QStringList providersToTest;
123};
124
125#endif // CIPHERUNITTEST_H
126

source code of qca/unittest/cipherunittest/cipherunittest.h