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.
15 * Generic Keypair implementation
16 * Generic Keypair implementation
25 #include <cryptospi/keypair.h>
26 #include <cryptospi/cryptoparams.h>
27 #include <cryptospi/keys.h>
29 #include "../common/inlines.h"
31 using namespace CryptoSpi;
34 EXPORT_C CKeyPair* CKeyPair::NewL(CKey* aPublicKey, CKey* aPrivateKey)
36 CKeyPair* self = new(ELeave) CKeyPair();
37 CleanupStack::PushL(self);
38 self->ConstructL(aPublicKey, aPrivateKey);
43 EXPORT_C const CKey& CKeyPair::PublicKey() const
48 EXPORT_C const CKey& CKeyPair::PrivateKey() const
63 void CKeyPair::ConstructL(CKey* aPublicKey, CKey* aPrivateKey)
65 iPublicKey = aPublicKey;
66 iPrivateKey = aPrivateKey;