crypto/weakcryptospi/test/tplugins/inc/keypairgenimpl.h
author hgs
Thu, 19 Aug 2010 11:18:56 +0530
changeset 94 0e6c5a9328b5
parent 56 c11c717470d0
permissions -rw-r--r--
201033_01

/*
* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*
*/


#ifndef __KEYPAIRGENIMPL_H__
#define __KEYPAIRGENIMPL_H__

/**
@file 
@internalComponent
@released
*/

#include <cryptospi/cryptokeypairgeneratorapi.h>
#include <cryptospi/keypairgeneratorplugin.h>

/**
 * Key pair generator plugin base class
 */
namespace SoftwareCrypto
	{
	using namespace CryptoSpi;
	
	NONSHARABLE_CLASS(CKeyPairGenImpl) : public CBase, public MKeyPairGenerator
		{
	public:

		// Override MPlugin virtual functions
		void Close();
		TAny* GetExtension(TUid aExtensionId);
		void GetCharacteristicsL(const TCharacteristics*& aPluginCharacteristics);
		// End of MPlugin

		// Destructor
		~CKeyPairGenImpl();

	protected:
		/**
		Constructor
		*/
		CKeyPairGenImpl(TUid aImplementationUid);
			
		/**
		Second phase of construction. Always call ConstructL in the super-class
		if you override this method.
		*/
		virtual void ConstructL();
		
		/**
		Helper function implemented by concrete cipher sub-class that allows
		GetCharacteristicsL to return the correct characteristics object.
		@return The implemention uid
		*/
		virtual TUid ImplementationUid() const = 0;
		
	protected:
	
		TUid iImplementationUid;
		
		};
	}

#endif // __KEYPAIRGENIMPL_H__