crypto/weakcrypto/test/tasymmetric/tvectortest.h
changeset 71 dd83586b62d6
equal deleted inserted replaced
66:8873e6835f7b 71:dd83586b62d6
       
     1 /*
       
     2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * Vector tests for asymmetric ciphers
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __TVECTOR_H__
       
    21 #define __TVECTOR_H__
       
    22 
       
    23 #include "t_testaction.h"
       
    24 #include <e32std.h>
       
    25 #include <asymmetric.h>
       
    26 #include <asymmetrickeys.h>
       
    27 #include <random.h>
       
    28 
       
    29 /**
       
    30  * Base class for vector tests that implements the virtual methods they all have
       
    31  * in common.
       
    32  */
       
    33 
       
    34 class CVectorTest : public CTestAction
       
    35 {
       
    36 public:
       
    37 	virtual void PerformAction(TRequestStatus& aStatus);
       
    38 protected:
       
    39     /** Constructor for derived classes. */
       
    40     CVectorTest(CConsoleBase& aConsole, Output& aOut);
       
    41 
       
    42 //	xxx should this be protected?
       
    43     virtual ~CVectorTest();
       
    44 	virtual void ConstructL(const TTestActionSpec& aTestActionSpec);
       
    45 	virtual void DoPerformPrerequisite(TRequestStatus& aStatus);
       
    46 	virtual void DoPerformPostrequisite(TRequestStatus& aStatus);
       
    47 	virtual void DoReportAction(void);
       
    48 	virtual void DoCheckResult(TInt);
       
    49 protected:
       
    50 	virtual void DoPerformActionL() = 0;
       
    51 	virtual void DoPerformanceTestActionL() = 0;
       
    52 protected:
       
    53 	TInt iPerfTestIterations;
       
    54 private:
       
    55 	TInt iActionResult;
       
    56 	TInt iKeyBits;
       
    57 };
       
    58 
       
    59 #endif