File indexing completed on 2024-05-05 04:45:29
0001 /** 0002 * Copyright (C) 2004-2007 Brad Hards <bradh@frogmouth.net> 0003 * Copyright (C) 2013-2016 Ivan Romanov <drizt@land.ru> 0004 * 0005 * Redistribution and use in source and binary forms, with or without 0006 * modification, are permitted provided that the following conditions 0007 * are met: 0008 * 0009 * 1. Redistributions of source code must retain the above copyright 0010 * notice, this list of conditions and the following disclaimer. 0011 * 2. Redistributions in binary form must reproduce the above copyright 0012 * notice, this list of conditions and the following disclaimer in the 0013 * documentation and/or other materials provided with the distribution. 0014 * 0015 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 0016 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 0017 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 0018 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 0019 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 0020 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 0021 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 0022 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 0023 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 0024 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0025 */ 0026 0027 #ifndef CIPHERUNITTEST_H 0028 #define CIPHERUNITTEST_H 0029 0030 #include <QtCrypto> 0031 0032 class CipherUnitTest : public QObject 0033 { 0034 Q_OBJECT 0035 0036 private Q_SLOTS: 0037 void initTestCase(); 0038 void cleanupTestCase(); 0039 void aes128_data(); 0040 void aes128(); 0041 void aes128_cbc_data(); 0042 void aes128_cbc(); 0043 void aes128_cbc_pkcs7_data(); 0044 void aes128_cbc_pkcs7(); 0045 void aes128_cfb_data(); 0046 void aes128_cfb(); 0047 void aes128_ofb_data(); 0048 void aes128_ofb(); 0049 void aes128_ctr_data(); 0050 void aes128_ctr(); 0051 void aes128_gcm_data(); 0052 void aes128_gcm(); 0053 void aes128_ccm_data(); 0054 void aes128_ccm(); 0055 0056 void aes192_data(); 0057 void aes192(); 0058 void aes192_cbc_data(); 0059 void aes192_cbc(); 0060 void aes192_cbc_pkcs7_data(); 0061 void aes192_cbc_pkcs7(); 0062 void aes192_cfb_data(); 0063 void aes192_cfb(); 0064 void aes192_ofb_data(); 0065 void aes192_ofb(); 0066 void aes192_ctr_data(); 0067 void aes192_ctr(); 0068 void aes192_gcm_data(); 0069 void aes192_gcm(); 0070 void aes192_ccm_data(); 0071 void aes192_ccm(); 0072 0073 void aes256_data(); 0074 void aes256(); 0075 void aes256_cbc_data(); 0076 void aes256_cbc(); 0077 void aes256_cbc_pkcs7_data(); 0078 void aes256_cbc_pkcs7(); 0079 void aes256_cfb_data(); 0080 void aes256_cfb(); 0081 void aes256_ofb_data(); 0082 void aes256_ofb(); 0083 void aes256_ctr_data(); 0084 void aes256_ctr(); 0085 void aes256_gcm_data(); 0086 void aes256_gcm(); 0087 void aes256_ccm_data(); 0088 void aes256_ccm(); 0089 0090 void tripleDES_data(); 0091 void tripleDES(); 0092 0093 void des_data(); 0094 void des(); 0095 void des_pkcs7_data(); 0096 void des_pkcs7(); 0097 void des_cbc_data(); 0098 void des_cbc(); 0099 void des_cbc_pkcs7_data(); 0100 void des_cbc_pkcs7(); 0101 void des_cfb_data(); 0102 void des_cfb(); 0103 void des_ofb_data(); 0104 void des_ofb(); 0105 0106 void blowfish_data(); 0107 void blowfish(); 0108 void blowfish_cbc_data(); 0109 void blowfish_cbc(); 0110 void blowfish_cbc_pkcs7_data(); 0111 void blowfish_cbc_pkcs7(); 0112 void blowfish_cfb_data(); 0113 void blowfish_cfb(); 0114 void blowfish_ofb_data(); 0115 void blowfish_ofb(); 0116 0117 void cast5_data(); 0118 void cast5(); 0119 0120 private: 0121 QCA::Initializer *m_init; 0122 QStringList providersToTest; 0123 }; 0124 0125 #endif // CIPHERUNITTEST_H