os/security/crypto/weakcryptospi/inc/spi/keypair.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/crypto/weakcryptospi/inc/spi/keypair.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,87 @@
     1.4 +/*
     1.5 +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +* crypto key pair definition - asymmetric key pair
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +/**
    1.24 + @file
    1.25 + @publishedPartner
    1.26 + @released
    1.27 +*/
    1.28 +
    1.29 +#ifndef __CRYPTOAPI_KEYPAIR_H__
    1.30 +#define __CRYPTOAPI_KEYPAIR_H__
    1.31 +
    1.32 +#include <cryptospi/keys.h>
    1.33 +
    1.34 +namespace CryptoSpi
    1.35 +	{
    1.36 +	
    1.37 +	/**
    1.38 +	The Asymmetric Key Pair Definition
    1.39 +	*/
    1.40 +	NONSHARABLE_CLASS(CKeyPair) : public CBase
    1.41 +		{
    1.42 +	public:
    1.43 +
    1.44 +		/**
    1.45 +		Create a CKeyPair instance from a public and private key. The 
    1.46 +		CKeyPair takes ownership of both keys.
    1.47 +		@param aPublicKey	The public key in the key pair.
    1.48 +		@param aPrivateKey	The private key in the key pair.
    1.49 +		@return a pointer to a CKeyPair instance
    1.50 +		*/
    1.51 +		IMPORT_C static CKeyPair* NewL(CKey* aPublicKey, CKey* aPrivateKey);
    1.52 +
    1.53 +		/**
    1.54 +		Retrieve the public key
    1.55 +		*/
    1.56 +		IMPORT_C const CKey& PublicKey() const;
    1.57 +
    1.58 +		/**
    1.59 +		Retrieve the private key
    1.60 +		*/
    1.61 +		IMPORT_C const CKey& PrivateKey() const;
    1.62 +
    1.63 +		~CKeyPair();
    1.64 +
    1.65 +	private:
    1.66 +		/**
    1.67 +		constructor
    1.68 +		*/
    1.69 +		CKeyPair();
    1.70 +
    1.71 +		/**
    1.72 +		2nd Phase Constructor
    1.73 +		*/
    1.74 +		void ConstructL(CKey*, CKey*);
    1.75 +
    1.76 +	private:
    1.77 +		/**
    1.78 +		The public key in the key pair
    1.79 +		*/
    1.80 +		CKey* iPublicKey;
    1.81 +
    1.82 +		/**
    1.83 +		The private key in the key pair
    1.84 +		*/
    1.85 +		CKey* iPrivateKey;
    1.86 +		};
    1.87 +
    1.88 +	} // namespace CryptoSpi
    1.89 +
    1.90 +#endif //__CRYPTOAPI_KEYPAIR_H__