os/security/crypto/weakcrypto/test/tsymmetric/tactionmontecarlo.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 *
    16 */
    17 
    18 
    19 #ifndef __TACTIONMONTECARLO_H__
    20 #define __TACTIONMONTECARLO_H__
    21 
    22 #include "cryptotestaction.h"
    23 
    24 class CBufferedEncryptor;	//	Forward declare
    25 class CBufferedDecryptor;	//	Forward declare
    26 
    27 const TInt KMonteCarloIterations = 10000;
    28 
    29 class CActionMonteCarlo : public CCryptoTestAction
    30 {
    31 public:
    32 	static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole,
    33 		Output& aOut, const TTestActionSpec& aTestActionSpec);
    34 	static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole,
    35 		Output& aOut, const TTestActionSpec& aTestActionSpec);
    36 	virtual ~CActionMonteCarlo();
    37 protected:
    38 	CActionMonteCarlo(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
    39 protected:
    40 	virtual void DoPerformPrerequisiteL();
    41 	virtual void DoPerformActionL();
    42 protected:
    43 	void DoAESEncryptECB();
    44 	void DoAESDecryptECB();
    45 	void DoAESEncryptCBC();
    46 	void DoAESDecryptCBC();
    47 protected:
    48 	CBufferedEncryptor* iEncrypt;
    49 	CBufferedDecryptor* iDecrypt;
    50 };
    51 
    52 #endif	//	__TACTIONMONTECARLO_H__