os/security/crypto/weakcrypto/test/tasymmetric/trsasignfb.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 * trsasign.h
    16 *
    17 */
    18 
    19 
    20 #ifndef __TRSASIGN_H__
    21 #define __TRSASIGN_H__
    22 
    23 #include "t_testaction.h"
    24 #include <e32std.h>
    25 #include <asymmetric.h>
    26 #include <asymmetrickeys.h>
    27 #include <random.h>
    28 #include "tsignatureinput.h"
    29 
    30 class CRSASignFB : public CTestAction
    31 {
    32 public:
    33 	~CRSASignFB();
    34 	static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole,
    35 		Output& aOut, const TTestActionSpec& aTestActionSpec);
    36 	static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole,
    37 		Output& aOut, const TTestActionSpec& aTestActionSpec);
    38 	void DoPerformPrerequisite(TRequestStatus& aStatus);
    39 	void DoPerformPostrequisite(TRequestStatus& aStatus);
    40 	void DoReportAction(void);
    41 	void DoCheckResult(TInt);
    42 	void PerformAction(TRequestStatus& aStatus);
    43 
    44 private:
    45 	CRSASignFB(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
    46 	void ConstructL(const TTestActionSpec& aTestActionSpec);
    47 	void Hex(HBufC8& string);
    48 	inline TRSAPrivateKeyType TypeOfCrypto();
    49 	void DoPerformActionL();
    50 	void DoPerformanceTestActionL();
    51 
    52 private:
    53 	RFs& iFs;
    54 	HBufC8* iBody;
    55 	HBufC8* iInput;
    56 	CSignatureInput* iSigInput;
    57 	TInt iActionResult;
    58 	TInt iKeyBits;
    59 	TInt iPerfTestIterations;
    60 	TRSAPrivateKeyType iCryptoType;
    61 };
    62 
    63 #endif