sl@0: /* sl@0: * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #ifndef __KEYPAIRGENIMPL_H__ sl@0: #define __KEYPAIRGENIMPL_H__ sl@0: sl@0: /** sl@0: @file sl@0: @internalComponent sl@0: @released sl@0: */ sl@0: sl@0: #include "cryptokeypairgeneratorapi.h" sl@0: #include "keypairgeneratorplugin.h" sl@0: sl@0: /** sl@0: * Key pair generator plugin base class sl@0: */ sl@0: namespace SoftwareCrypto sl@0: { sl@0: using namespace CryptoSpi; sl@0: sl@0: NONSHARABLE_CLASS(CKeyPairGenImpl) : public CBase, public MKeyPairGenerator sl@0: { sl@0: public: sl@0: sl@0: // Override MPlugin virtual functions sl@0: void Close(); sl@0: TAny* GetExtension(TUid aExtensionId); sl@0: void GetCharacteristicsL(const TCharacteristics*& aPluginCharacteristics); sl@0: // End of MPlugin sl@0: sl@0: // Destructor sl@0: ~CKeyPairGenImpl(); sl@0: sl@0: protected: sl@0: /** sl@0: Constructor sl@0: */ sl@0: CKeyPairGenImpl(); sl@0: sl@0: /** sl@0: Second phase of construction. Always call ConstructL in the super-class sl@0: if you override this method. sl@0: */ sl@0: virtual void ConstructL(); sl@0: sl@0: /** sl@0: Helper function implemented by concrete cipher sub-class that allows sl@0: GetCharacteristicsL to return the correct characteristics object. sl@0: @return The implemention uid sl@0: */ sl@0: virtual TUid ImplementationUid() const = 0; sl@0: }; sl@0: } sl@0: sl@0: #endif // __KEYPAIRGENIMPL_H__