Update contrib.
2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #ifndef __CRYPTOTESTACTION_H__
20 #define __CRYPTOTESTACTION_H__
22 #include "t_testaction.h"
25 _LIT8(KVectorStart, "<vector>");
26 _LIT8(KVectorEnd, "</vector>");
27 _LIT8(KIncrementalStart, "<incremental>");
28 _LIT8(KIncrementalEnd, "</incremental>");
29 _LIT8(KKeyStart, "<key>");
30 _LIT8(KKeyEnd, "</key>");
31 _LIT8(KInputStart, "<input>");
32 _LIT8(KInputEnd, "</input>");
33 _LIT8(KOutputStart, "<output>");
34 _LIT8(KOutputEnd, "</output>");
35 _LIT8(KCipherTypeStart, "<ciphertype>");
36 _LIT8(KCipherTypeEnd, "</ciphertype>");
37 _LIT8(KIVStart, "<iv>");
38 _LIT8(KIVEnd, "</iv>");
39 _LIT8(KMonteCarloStart, "<MonteCarlo>");
40 _LIT8(KMonteCarloEnd, "</MonteCarlo>");
41 _LIT8(KEffKeyLenStart, "<effectiveKeyLength>");
42 _LIT8(KEffKeyLenEnd, "</effectiveKeyLength>");
43 _LIT8(KIterationsStart, "<iterations>");
44 _LIT8(KIterationsEnd, "</iterations>");
45 _LIT8(KRandDataSizeStart, "<randDataSize>"); //Used specifically in performance tests where random data is used rather than specific input and output data pairs
46 _LIT8(KRandDataSizeEnd, "</randDataSize>"); //Used specifically in performance tests where random data is used rather than specific input and output data pairs
49 class CCryptoTestAction : public CTestAction
52 CCryptoTestAction(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
55 virtual void ConstructL(const TTestActionSpec& aTestActionSpec);
56 virtual void DoPerformPrerequisite(TRequestStatus& aStatus);
57 virtual void DoPerformPostrequisite(TRequestStatus& aStatus);
58 virtual void PerformAction(TRequestStatus& aStatus);
59 virtual void DoReportAction(void);
60 virtual void DoCheckResult(TInt);
61 virtual void Reset(){}
63 virtual void DoPerformPrerequisiteL() = 0;
64 virtual void DoPerformActionL() = 0;
65 virtual void DoPerformPostrequisiteL() {}
67 void Hex(HBufC8& string);
68 void DoInputParseL(TDesC8& aScriptBuffer);
78 EAESMonteCarloEncryptECB, // These extra categories have been added
79 EAESMonteCarloDecryptECB, // because the Monte-Carlo tests have to be
80 EAESMonteCarloEncryptCBC, // split between encrypt and decrypt scripts
81 EAESMonteCarloDecryptCBC, // (too big for test framework in one chunk)
96 TInt iEffectiveKeyLen;
98 TInt iEncryptIterations;
99 TInt iDecryptIterations;
100 TCipherType iCipherType;
101 TTimeIntervalMicroSeconds iEncryptorCreateTime;
102 TTimeIntervalMicroSeconds iDecryptorCreateTime;
103 TInt iExpectedWeakResult;
107 #endif // __CRYPTOTESTACTION_H__