cryptoplugins/cryptospiplugins/source/softwarecrypto/rsakeypairgenimpl.h
changeset 19 cd501b96611d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cryptoplugins/cryptospiplugins/source/softwarecrypto/rsakeypairgenimpl.h	Fri Nov 06 13:21:00 2009 +0200
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2006-2009 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 __RSAKEYPAIRGENIMPL_H__
+#define __RSAKEYPAIRGENIMPL_H__
+
+/**
+@file 
+@internalComponent
+@released
+*/
+
+#include <e32base.h>
+#include <e32cmn.h>
+#include "keypairgenimpl.h"
+
+/**
+ * Implementation of RSA key pair generation as described in PKCS#1 v1.5.
+ */
+namespace SoftwareCrypto
+	{
+	NONSHARABLE_CLASS(CRSAKeyPairGenImpl) : public CKeyPairGenImpl
+		{
+	public:
+	
+		static CRSAKeyPairGenImpl* NewL();
+		static CRSAKeyPairGenImpl* NewLC();
+
+		// from MPlugin
+		void Reset();
+
+		// from MKeyPairGenerator
+		void GenerateKeyPairL(TInt aKeySize, const CCryptoParams& aKeyParameters, CKeyPair*& aKeyPair);
+		
+		// Override CKeyPairGenImpl virtual functions
+		TUid ImplementationUid() const;
+		
+		const CExtendedCharacteristics* GetExtendedCharacteristicsL();
+		static CExtendedCharacteristics* CreateExtendedCharacteristicsL();
+		
+		// Destructor
+		~CRSAKeyPairGenImpl();
+
+	private:
+		/**
+		Constructor
+		*/
+		CRSAKeyPairGenImpl();
+			
+		/// second phase of construction
+		void ConstructL();
+		};
+	}
+
+#endif // __RSAKEYPAIRGENIMPL_H__