os/security/crypto/weakcrypto/test/tasymmetric/tdsavector.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200 (2012-06-15)
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of the License "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description: 
sl@0
    15
* trdavector.h
sl@0
    16
* Vector tests for RSA ciphers
sl@0
    17
*
sl@0
    18
*/
sl@0
    19
sl@0
    20
sl@0
    21
#ifndef __TDSAVECTOR_H__
sl@0
    22
#define __TDSAVECTOR_H__
sl@0
    23
sl@0
    24
#include "tvectortest.h"
sl@0
    25
#include "asymmetrickeys.h"
sl@0
    26
#include "tsignatureinput.h"
sl@0
    27
sl@0
    28
/**
sl@0
    29
 * Runs DSA signing vectors.
sl@0
    30
 */
sl@0
    31
sl@0
    32
class CDSASignVector : public CVectorTest
sl@0
    33
    {
sl@0
    34
public:
sl@0
    35
	static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole,
sl@0
    36
		Output& aOut, const TTestActionSpec& aTestActionSpec);
sl@0
    37
	static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole,
sl@0
    38
		Output& aOut, const TTestActionSpec& aTestActionSpec);
sl@0
    39
	virtual ~CDSASignVector();
sl@0
    40
	virtual void DoCheckResult(TInt aError);
sl@0
    41
protected:
sl@0
    42
	virtual void DoPerformActionL();
sl@0
    43
	virtual void DoPerformanceTestActionL();
sl@0
    44
private:
sl@0
    45
	CDSASignVector(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
sl@0
    46
	void ConstructL(const TTestActionSpec& aTestActionSpec);
sl@0
    47
sl@0
    48
	CDSAPrivateKey* iPrivKey;
sl@0
    49
	TPtrC8 iMessage;
sl@0
    50
	HBufC8* iK;
sl@0
    51
	CDSASignature* iSignature;
sl@0
    52
	CSignatureInput* iSigInput;
sl@0
    53
    };
sl@0
    54
sl@0
    55
/**
sl@0
    56
 * Runs DSA verification vectors.
sl@0
    57
 */
sl@0
    58
sl@0
    59
class CDSAVerifyVector : public CVectorTest
sl@0
    60
    {
sl@0
    61
public:
sl@0
    62
	static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole,
sl@0
    63
		Output& aOut, const TTestActionSpec& aTestActionSpec);
sl@0
    64
	static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole,
sl@0
    65
		Output& aOut, const TTestActionSpec& aTestActionSpec);
sl@0
    66
	virtual ~CDSAVerifyVector();
sl@0
    67
	//virtual void PerformAction(TRequestStatus& aStatus);
sl@0
    68
	virtual void DoCheckResult(TInt aError);
sl@0
    69
protected:
sl@0
    70
	virtual void DoPerformActionL();
sl@0
    71
	virtual void DoPerformanceTestActionL();
sl@0
    72
sl@0
    73
private:
sl@0
    74
	CDSAVerifyVector(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
sl@0
    75
	void ConstructL(const TTestActionSpec& aTestActionSpec);
sl@0
    76
sl@0
    77
	CDSAPublicKey* iPubKey;    
sl@0
    78
	HBufC8* iMessage;
sl@0
    79
	CDSASignature* iSignature;
sl@0
    80
	CSignatureInput* iSigInput;
sl@0
    81
    };
sl@0
    82
sl@0
    83
#endif