Update contrib.
2 * Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #ifndef __KEYAGREEMENTIMPL_H__
20 #define __KEYAGREEMENTIMPL_H__
29 #include <cryptospi/cryptospidef.h>
30 #include <cryptospi/keys.h>
31 #include <cryptospi/keyagreementplugin.h>
34 * Abstract base class for key agreement plug-ins.
36 namespace SoftwareCrypto
38 using namespace CryptoSpi;
40 NONSHARABLE_CLASS(CKeyAgreementImpl) : public CBase, public MKeyAgreement
44 // Override MPlugin virtual functions
46 void Reset(); // Always call reset in super-class if you override this
47 TAny* GetExtension(TUid aExtensionId);
48 void GetCharacteristicsL(const TCharacteristics*& aPluginCharacteristics);
51 // Override MKeyAgreement virtual functions
52 void SetKeyL(const CKey& aSelfPrivateKey, const CCryptoParams* aParams);
53 // End of MKeyAgreement
65 Second phase of construction. Always call ConstructL in the super-class
66 if your override this method.
67 @param aPrivateKey The private key of one of the parties
68 @param aParams The parameters shared between both parties
70 virtual void ConstructL(const CKey& aPrivateKey, const CCryptoParams* aParams);
73 Helper function implemented by concrete cipher sub-class that allows
74 GetCharacteristicsL to return the correct characteristics object.
75 @return The implemention uid
77 virtual TUid ImplementationUid() const = 0;
83 CCryptoParams* iSharedParams; // common parameters between our private key and their public key
87 #endif // __KEYAGREEMENTIMPL_H__