1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/ssl/tsrc/crypto_test/inc/crypto_test.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,203 @@
1.4 +/*
1.5 +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
1.6 +
1.7 +* Redistribution and use in source and binary forms, with or without
1.8 +* modification, are permitted provided that the following conditions are met:
1.9 +
1.10 +* Redistributions of source code must retain the above copyright notice, this
1.11 +* list of conditions and the following disclaimer.
1.12 +* Redistributions in binary form must reproduce the above copyright notice,
1.13 +* this list of conditions and the following disclaimer in the documentation
1.14 +* and/or other materials provided with the distribution.
1.15 +* Neither the name of Nokia Corporation nor the names of its contributors
1.16 +* may be used to endorse or promote products derived from this software
1.17 +* without specific prior written permission.
1.18 +
1.19 +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1.20 +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1.21 +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1.22 +* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1.23 +* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1.24 +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1.25 +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1.26 +* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1.27 +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1.28 +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1.29 +*
1.30 +* Description: ?Description
1.31 +*
1.32 +*/
1.33 +
1.34 +
1.35 +
1.36 +#ifndef CRYPTO_TEST_H
1.37 +#define CRYPTO_TEST_H
1.38 +
1.39 +// INCLUDES
1.40 +#include <StifLogger.h>
1.41 +#include <TestScripterInternal.h>
1.42 +#include <StifTestModule.h>
1.43 +
1.44 +
1.45 +// CONSTANTS
1.46 +//const ?type ?constant_var = ?constant;
1.47 +
1.48 +// MACROS
1.49 +//#define ?macro ?macro_def
1.50 +// Logging path
1.51 +_LIT( Kcrypto_testLogPath, "\\logs\\testframework\\crypto_test\\" );
1.52 +// Log file
1.53 +_LIT( Kcrypto_testLogFile, "crypto_test.txt" );
1.54 +
1.55 +// FUNCTION PROTOTYPES
1.56 +//?type ?function_name(?arg_list);
1.57 +
1.58 +// FORWARD DECLARATIONS
1.59 +//class ?FORWARD_CLASSNAME;
1.60 +class Ccrypto_test;
1.61 +
1.62 +// DATA TYPES
1.63 +//enum ?declaration
1.64 +//typedef ?declaration
1.65 +//extern ?data_type;
1.66 +
1.67 +// CLASS DECLARATION
1.68 +
1.69 +/**
1.70 +* Ccrypto_test test class for STIF Test Framework TestScripter.
1.71 +* ?other_description_lines
1.72 +*
1.73 +* @lib ?library
1.74 +* @since ?Series60_version
1.75 +*/
1.76 +NONSHARABLE_CLASS(Ccrypto_test) : public CScriptBase
1.77 + {
1.78 + public: // Constructors and destructor
1.79 +
1.80 + /**
1.81 + * Two-phased constructor.
1.82 + */
1.83 + static Ccrypto_test* NewL( CTestModuleIf& aTestModuleIf );
1.84 +
1.85 + /**
1.86 + * Destructor.
1.87 + */
1.88 + virtual ~Ccrypto_test();
1.89 +
1.90 + public: // New functions
1.91 +
1.92 + /**
1.93 + * ?member_description.
1.94 + * @since ?Series60_version
1.95 + * @param ?arg1 ?description
1.96 + * @return ?description
1.97 + */
1.98 + //?type ?member_function( ?type ?arg1 );
1.99 +
1.100 + public: // Functions from base classes
1.101 +
1.102 + /**
1.103 + * From CScriptBase Runs a script line.
1.104 + * @since ?Series60_version
1.105 + * @param aItem Script line containing method name and parameters
1.106 + * @return Symbian OS error code
1.107 + */
1.108 + virtual TInt RunMethodL( CStifItemParser& aItem );
1.109 +
1.110 + protected: // New functions
1.111 +
1.112 + /**
1.113 + * ?member_description.
1.114 + * @since ?Series60_version
1.115 + * @param ?arg1 ?description
1.116 + * @return ?description
1.117 + */
1.118 + //?type ?member_function( ?type ?arg1 );
1.119 +
1.120 + protected: // Functions from base classes
1.121 +
1.122 + /**
1.123 + * From ?base_class ?member_description
1.124 + */
1.125 + //?type ?member_function();
1.126 +
1.127 + private:
1.128 +
1.129 + /**
1.130 + * C++ default constructor.
1.131 + */
1.132 + Ccrypto_test( CTestModuleIf& aTestModuleIf );
1.133 +
1.134 + /**
1.135 + * By default Symbian 2nd phase constructor is private.
1.136 + */
1.137 + void ConstructL();
1.138 +
1.139 + // Prohibit copy constructor if not deriving from CBase.
1.140 + // ?classname( const ?classname& );
1.141 + // Prohibit assigment operator if not deriving from CBase.
1.142 + // ?classname& operator=( const ?classname& );
1.143 +
1.144 + /**
1.145 + * Frees all resources allocated from test methods.
1.146 + * @since ?Series60_version
1.147 + */
1.148 + void Delete();
1.149 +
1.150 + /**
1.151 + * Test methods are listed below.
1.152 + */
1.153 +
1.154 + /**
1.155 + * Example test method.
1.156 + * @since ?Series60_version
1.157 + * @param aItem Script line containing parameters.
1.158 + * @return Symbian OS error code.
1.159 + */
1.160 + virtual TInt BnTest( CStifItemParser& aItem );
1.161 + virtual TInt DesTest( CStifItemParser& aItem );
1.162 + virtual TInt DhTest( CStifItemParser& aItem );
1.163 + virtual TInt DsaTest( CStifItemParser& aItem );
1.164 + virtual TInt EngineTest( CStifItemParser& aItem );
1.165 + virtual TInt EvpTest( CStifItemParser& aItem );
1.166 + virtual TInt ExpTest( CStifItemParser& aItem );
1.167 + virtual TInt HmacTest( CStifItemParser& aItem );
1.168 + virtual TInt Md2Test( CStifItemParser& aItem );
1.169 + virtual TInt Md5Test( CStifItemParser& aItem );
1.170 + virtual TInt RandTest( CStifItemParser& aItem );
1.171 + virtual TInt Rc2Test( CStifItemParser& aItem );
1.172 + virtual TInt Rc4Test( CStifItemParser& aItem );
1.173 + virtual TInt RsaTest( CStifItemParser& aItem );
1.174 + virtual TInt ShaTest( CStifItemParser& aItem );
1.175 + virtual TInt Sha1Test( CStifItemParser& aItem );
1.176 + virtual TInt Sha256Test( CStifItemParser& aItem );
1.177 + virtual TInt Sha512Test( CStifItemParser& aItem );
1.178 +
1.179 + public: // Data
1.180 + // ?one_line_short_description_of_data
1.181 + //?data_declaration;
1.182 +
1.183 + protected: // Data
1.184 + // ?one_line_short_description_of_data
1.185 + //?data_declaration;
1.186 +
1.187 + private: // Data
1.188 +
1.189 + // ?one_line_short_description_of_data
1.190 + //?data_declaration;
1.191 +
1.192 + // Reserved pointer for future extension
1.193 + //TAny* iReserved;
1.194 +
1.195 + public: // Friend classes
1.196 + //?friend_class_declaration;
1.197 + protected: // Friend classes
1.198 + //?friend_class_declaration;
1.199 + private: // Friend classes
1.200 + //?friend_class_declaration;
1.201 +
1.202 + };
1.203 +
1.204 +#endif // CRYPTO_TEST_H
1.205 +
1.206 +// End of File