ssl/tsrc/crypto_test/inc/crypto_test.h
changeset 31 ce057bb09d0b
child 45 4b03adbd26ca
equal deleted inserted replaced
30:e20de85af2ee 31:ce057bb09d0b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
       
     3 
       
     4 * Redistribution and use in source and binary forms, with or without 
       
     5 * modification, are permitted provided that the following conditions are met:
       
     6 
       
     7 * Redistributions of source code must retain the above copyright notice, this 
       
     8 * list of conditions and the following disclaimer.
       
     9 * Redistributions in binary form must reproduce the above copyright notice, 
       
    10 * this list of conditions and the following disclaimer in the documentation 
       
    11 * and/or other materials provided with the distribution.
       
    12 * Neither the name of Nokia Corporation nor the names of its contributors 
       
    13 * may be used to endorse or promote products derived from this software 
       
    14 * without specific prior written permission.
       
    15 
       
    16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
       
    17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
       
    18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
       
    19 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 
       
    20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
       
    21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
       
    22 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
       
    23 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
       
    24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
       
    25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       
    26 *
       
    27 * Description:  ?Description
       
    28 *
       
    29 */
       
    30 
       
    31 
       
    32 
       
    33 #ifndef CRYPTO_TEST_H
       
    34 #define CRYPTO_TEST_H
       
    35 
       
    36 //  INCLUDES
       
    37 #include <StifLogger.h>
       
    38 #include <TestScripterInternal.h>
       
    39 #include <StifTestModule.h>
       
    40 
       
    41 
       
    42 // CONSTANTS
       
    43 //const ?type ?constant_var = ?constant;
       
    44 
       
    45 // MACROS
       
    46 //#define ?macro ?macro_def
       
    47 // Logging path
       
    48 _LIT( Kcrypto_testLogPath, "\\logs\\testframework\\crypto_test\\" ); 
       
    49 // Log file
       
    50 _LIT( Kcrypto_testLogFile, "crypto_test.txt" ); 
       
    51 
       
    52 // FUNCTION PROTOTYPES
       
    53 //?type ?function_name(?arg_list);
       
    54 
       
    55 // FORWARD DECLARATIONS
       
    56 //class ?FORWARD_CLASSNAME;
       
    57 class Ccrypto_test;
       
    58 
       
    59 // DATA TYPES
       
    60 //enum ?declaration
       
    61 //typedef ?declaration
       
    62 //extern ?data_type;
       
    63 
       
    64 // CLASS DECLARATION
       
    65 
       
    66 /**
       
    67 *  Ccrypto_test test class for STIF Test Framework TestScripter.
       
    68 *  ?other_description_lines
       
    69 *
       
    70 *  @lib ?library
       
    71 *  @since ?Series60_version
       
    72 */
       
    73 NONSHARABLE_CLASS(Ccrypto_test) : public CScriptBase
       
    74     {
       
    75     public:  // Constructors and destructor
       
    76 
       
    77         /**
       
    78         * Two-phased constructor.
       
    79         */
       
    80         static Ccrypto_test* NewL( CTestModuleIf& aTestModuleIf );
       
    81 
       
    82         /**
       
    83         * Destructor.
       
    84         */
       
    85         virtual ~Ccrypto_test();
       
    86 
       
    87     public: // New functions
       
    88 
       
    89         /**
       
    90         * ?member_description.
       
    91         * @since ?Series60_version
       
    92         * @param ?arg1 ?description
       
    93         * @return ?description
       
    94         */
       
    95         //?type ?member_function( ?type ?arg1 );
       
    96 
       
    97     public: // Functions from base classes
       
    98 
       
    99         /**
       
   100         * From CScriptBase Runs a script line.
       
   101         * @since ?Series60_version
       
   102         * @param aItem Script line containing method name and parameters
       
   103         * @return Symbian OS error code
       
   104         */
       
   105         virtual TInt RunMethodL( CStifItemParser& aItem );
       
   106 
       
   107     protected:  // New functions
       
   108 
       
   109         /**
       
   110         * ?member_description.
       
   111         * @since ?Series60_version
       
   112         * @param ?arg1 ?description
       
   113         * @return ?description
       
   114         */
       
   115         //?type ?member_function( ?type ?arg1 );
       
   116 
       
   117     protected:  // Functions from base classes
       
   118 
       
   119         /**
       
   120         * From ?base_class ?member_description
       
   121         */
       
   122         //?type ?member_function();
       
   123 
       
   124     private:
       
   125 
       
   126         /**
       
   127         * C++ default constructor.
       
   128         */
       
   129         Ccrypto_test( CTestModuleIf& aTestModuleIf );
       
   130 
       
   131         /**
       
   132         * By default Symbian 2nd phase constructor is private.
       
   133         */
       
   134         void ConstructL();
       
   135 
       
   136         // Prohibit copy constructor if not deriving from CBase.
       
   137         // ?classname( const ?classname& );
       
   138         // Prohibit assigment operator if not deriving from CBase.
       
   139         // ?classname& operator=( const ?classname& );
       
   140 
       
   141         /**
       
   142         * Frees all resources allocated from test methods.
       
   143         * @since ?Series60_version
       
   144         */
       
   145         void Delete();
       
   146 
       
   147         /**
       
   148         * Test methods are listed below. 
       
   149         */
       
   150 
       
   151         /**
       
   152         * Example test method.
       
   153         * @since ?Series60_version
       
   154         * @param aItem Script line containing parameters.
       
   155         * @return Symbian OS error code.
       
   156         */
       
   157         virtual TInt BnTest( CStifItemParser& aItem );
       
   158         virtual TInt DesTest( CStifItemParser& aItem );
       
   159         virtual TInt DhTest( CStifItemParser& aItem );
       
   160         virtual TInt DsaTest( CStifItemParser& aItem );
       
   161         virtual TInt EngineTest( CStifItemParser& aItem );
       
   162         virtual TInt EvpTest( CStifItemParser& aItem );
       
   163         virtual TInt ExpTest( CStifItemParser& aItem );
       
   164         virtual TInt HmacTest( CStifItemParser& aItem );
       
   165         virtual TInt Md2Test( CStifItemParser& aItem );
       
   166         virtual TInt Md5Test( CStifItemParser& aItem );
       
   167         virtual TInt RandTest( CStifItemParser& aItem );
       
   168         virtual TInt Rc2Test( CStifItemParser& aItem );
       
   169         virtual TInt Rc4Test( CStifItemParser& aItem );
       
   170         virtual TInt RsaTest( CStifItemParser& aItem );
       
   171         virtual TInt ShaTest( CStifItemParser& aItem );
       
   172         virtual TInt Sha1Test( CStifItemParser& aItem );
       
   173         virtual TInt Sha256Test( CStifItemParser& aItem );
       
   174         virtual TInt Sha512Test( CStifItemParser& aItem );
       
   175 
       
   176     public:     // Data
       
   177         // ?one_line_short_description_of_data
       
   178         //?data_declaration;
       
   179 
       
   180     protected:  // Data
       
   181         // ?one_line_short_description_of_data
       
   182         //?data_declaration;
       
   183 
       
   184     private:    // Data
       
   185         
       
   186         // ?one_line_short_description_of_data
       
   187         //?data_declaration;
       
   188 
       
   189         // Reserved pointer for future extension
       
   190         //TAny* iReserved;
       
   191 
       
   192     public:     // Friend classes
       
   193         //?friend_class_declaration;
       
   194     protected:  // Friend classes
       
   195         //?friend_class_declaration;
       
   196     private:    // Friend classes
       
   197         //?friend_class_declaration;
       
   198 
       
   199     };
       
   200 
       
   201 #endif      // CRYPTO_TEST_H
       
   202 
       
   203 // End of File