sl@0: /* sl@0: * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. sl@0: sl@0: * Redistribution and use in source and binary forms, with or without sl@0: * modification, are permitted provided that the following conditions are met: sl@0: sl@0: * Redistributions of source code must retain the above copyright notice, this sl@0: * list of conditions and the following disclaimer. sl@0: * Redistributions in binary form must reproduce the above copyright notice, sl@0: * this list of conditions and the following disclaimer in the documentation sl@0: * and/or other materials provided with the distribution. sl@0: * Neither the name of Nokia Corporation nor the names of its contributors sl@0: * may be used to endorse or promote products derived from this software sl@0: * without specific prior written permission. sl@0: sl@0: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" sl@0: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE sl@0: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE sl@0: * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE sl@0: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL sl@0: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR sl@0: * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER sl@0: * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, sl@0: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE sl@0: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. sl@0: * sl@0: * Description: ?Description sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #ifndef CRYPTO_TEST_H sl@0: #define CRYPTO_TEST_H sl@0: sl@0: // INCLUDES sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: sl@0: // CONSTANTS sl@0: //const ?type ?constant_var = ?constant; sl@0: sl@0: // MACROS sl@0: //#define ?macro ?macro_def sl@0: // Logging path sl@0: _LIT( Kcrypto_testLogPath, "\\logs\\testframework\\crypto_test\\" ); sl@0: // Log file sl@0: _LIT( Kcrypto_testLogFile, "crypto_test.txt" ); sl@0: sl@0: // FUNCTION PROTOTYPES sl@0: //?type ?function_name(?arg_list); sl@0: sl@0: // FORWARD DECLARATIONS sl@0: //class ?FORWARD_CLASSNAME; sl@0: class Ccrypto_test; sl@0: sl@0: // DATA TYPES sl@0: //enum ?declaration sl@0: //typedef ?declaration sl@0: //extern ?data_type; sl@0: sl@0: // CLASS DECLARATION sl@0: sl@0: /** sl@0: * Ccrypto_test test class for STIF Test Framework TestScripter. sl@0: * ?other_description_lines sl@0: * sl@0: * @lib ?library sl@0: * @since ?Series60_version sl@0: */ sl@0: NONSHARABLE_CLASS(Ccrypto_test) : public CScriptBase sl@0: { sl@0: public: // Constructors and destructor sl@0: sl@0: /** sl@0: * Two-phased constructor. sl@0: */ sl@0: static Ccrypto_test* NewL( CTestModuleIf& aTestModuleIf ); sl@0: sl@0: /** sl@0: * Destructor. sl@0: */ sl@0: virtual ~Ccrypto_test(); sl@0: sl@0: public: // New functions sl@0: sl@0: /** sl@0: * ?member_description. sl@0: * @since ?Series60_version sl@0: * @param ?arg1 ?description sl@0: * @return ?description sl@0: */ sl@0: //?type ?member_function( ?type ?arg1 ); sl@0: sl@0: public: // Functions from base classes sl@0: sl@0: /** sl@0: * From CScriptBase Runs a script line. sl@0: * @since ?Series60_version sl@0: * @param aItem Script line containing method name and parameters sl@0: * @return Symbian OS error code sl@0: */ sl@0: virtual TInt RunMethodL( CStifItemParser& aItem ); sl@0: sl@0: protected: // New functions sl@0: sl@0: /** sl@0: * ?member_description. sl@0: * @since ?Series60_version sl@0: * @param ?arg1 ?description sl@0: * @return ?description sl@0: */ sl@0: //?type ?member_function( ?type ?arg1 ); sl@0: sl@0: protected: // Functions from base classes sl@0: sl@0: /** sl@0: * From ?base_class ?member_description sl@0: */ sl@0: //?type ?member_function(); sl@0: sl@0: private: sl@0: sl@0: /** sl@0: * C++ default constructor. sl@0: */ sl@0: Ccrypto_test( CTestModuleIf& aTestModuleIf ); sl@0: sl@0: /** sl@0: * By default Symbian 2nd phase constructor is private. sl@0: */ sl@0: void ConstructL(); sl@0: sl@0: // Prohibit copy constructor if not deriving from CBase. sl@0: // ?classname( const ?classname& ); sl@0: // Prohibit assigment operator if not deriving from CBase. sl@0: // ?classname& operator=( const ?classname& ); sl@0: sl@0: /** sl@0: * Frees all resources allocated from test methods. sl@0: * @since ?Series60_version sl@0: */ sl@0: void Delete(); sl@0: sl@0: /** sl@0: * Test methods are listed below. sl@0: */ sl@0: sl@0: /** sl@0: * Example test method. sl@0: * @since ?Series60_version sl@0: * @param aItem Script line containing parameters. sl@0: * @return Symbian OS error code. sl@0: */ sl@0: virtual TInt BnTest( CStifItemParser& aItem ); sl@0: virtual TInt DesTest( CStifItemParser& aItem ); sl@0: virtual TInt DhTest( CStifItemParser& aItem ); sl@0: virtual TInt DsaTest( CStifItemParser& aItem ); sl@0: virtual TInt EngineTest( CStifItemParser& aItem ); sl@0: virtual TInt EvpTest( CStifItemParser& aItem ); sl@0: virtual TInt ExpTest( CStifItemParser& aItem ); sl@0: virtual TInt HmacTest( CStifItemParser& aItem ); sl@0: virtual TInt Md2Test( CStifItemParser& aItem ); sl@0: virtual TInt Md5Test( CStifItemParser& aItem ); sl@0: virtual TInt RandTest( CStifItemParser& aItem ); sl@0: virtual TInt Rc2Test( CStifItemParser& aItem ); sl@0: virtual TInt Rc4Test( CStifItemParser& aItem ); sl@0: virtual TInt RsaTest( CStifItemParser& aItem ); sl@0: virtual TInt ShaTest( CStifItemParser& aItem ); sl@0: virtual TInt Sha1Test( CStifItemParser& aItem ); sl@0: virtual TInt Sha256Test( CStifItemParser& aItem ); sl@0: virtual TInt Sha512Test( CStifItemParser& aItem ); sl@0: sl@0: public: // Data sl@0: // ?one_line_short_description_of_data sl@0: //?data_declaration; sl@0: sl@0: protected: // Data sl@0: // ?one_line_short_description_of_data sl@0: //?data_declaration; sl@0: sl@0: private: // Data sl@0: sl@0: // ?one_line_short_description_of_data sl@0: //?data_declaration; sl@0: sl@0: // Reserved pointer for future extension sl@0: //TAny* iReserved; sl@0: sl@0: public: // Friend classes sl@0: //?friend_class_declaration; sl@0: protected: // Friend classes sl@0: //?friend_class_declaration; sl@0: private: // Friend classes sl@0: //?friend_class_declaration; sl@0: sl@0: }; sl@0: sl@0: #endif // CRYPTO_TEST_H sl@0: sl@0: // End of File