os/security/crypto/weakcrypto/test/tasymmetric/tdsavector.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/crypto/weakcrypto/test/tasymmetric/tdsavector.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,83 @@
     1.4 +/*
     1.5 +* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +* trdavector.h
    1.19 +* Vector tests for RSA ciphers
    1.20 +*
    1.21 +*/
    1.22 +
    1.23 +
    1.24 +#ifndef __TDSAVECTOR_H__
    1.25 +#define __TDSAVECTOR_H__
    1.26 +
    1.27 +#include "tvectortest.h"
    1.28 +#include "asymmetrickeys.h"
    1.29 +#include "tsignatureinput.h"
    1.30 +
    1.31 +/**
    1.32 + * Runs DSA signing vectors.
    1.33 + */
    1.34 +
    1.35 +class CDSASignVector : public CVectorTest
    1.36 +    {
    1.37 +public:
    1.38 +	static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole,
    1.39 +		Output& aOut, const TTestActionSpec& aTestActionSpec);
    1.40 +	static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole,
    1.41 +		Output& aOut, const TTestActionSpec& aTestActionSpec);
    1.42 +	virtual ~CDSASignVector();
    1.43 +	virtual void DoCheckResult(TInt aError);
    1.44 +protected:
    1.45 +	virtual void DoPerformActionL();
    1.46 +	virtual void DoPerformanceTestActionL();
    1.47 +private:
    1.48 +	CDSASignVector(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
    1.49 +	void ConstructL(const TTestActionSpec& aTestActionSpec);
    1.50 +
    1.51 +	CDSAPrivateKey* iPrivKey;
    1.52 +	TPtrC8 iMessage;
    1.53 +	HBufC8* iK;
    1.54 +	CDSASignature* iSignature;
    1.55 +	CSignatureInput* iSigInput;
    1.56 +    };
    1.57 +
    1.58 +/**
    1.59 + * Runs DSA verification vectors.
    1.60 + */
    1.61 +
    1.62 +class CDSAVerifyVector : public CVectorTest
    1.63 +    {
    1.64 +public:
    1.65 +	static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole,
    1.66 +		Output& aOut, const TTestActionSpec& aTestActionSpec);
    1.67 +	static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole,
    1.68 +		Output& aOut, const TTestActionSpec& aTestActionSpec);
    1.69 +	virtual ~CDSAVerifyVector();
    1.70 +	//virtual void PerformAction(TRequestStatus& aStatus);
    1.71 +	virtual void DoCheckResult(TInt aError);
    1.72 +protected:
    1.73 +	virtual void DoPerformActionL();
    1.74 +	virtual void DoPerformanceTestActionL();
    1.75 +
    1.76 +private:
    1.77 +	CDSAVerifyVector(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
    1.78 +	void ConstructL(const TTestActionSpec& aTestActionSpec);
    1.79 +
    1.80 +	CDSAPublicKey* iPubKey;    
    1.81 +	HBufC8* iMessage;
    1.82 +	CDSASignature* iSignature;
    1.83 +	CSignatureInput* iSigInput;
    1.84 +    };
    1.85 +
    1.86 +#endif