cryptoservices/filebasedcertificateandkeystores/test/thwkeystore/common/tkeydetails.h
changeset 15 da2ae96f639b
child 29 ece3df019add
equal deleted inserted replaced
10:afc583cfa176 15:da2ae96f639b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * Defines the class which represents the structure of the key on 
       
    16 * which Crypto Token HAI internally operates. It contains the key 
       
    17 * information relevant to Crypto Token HAI.
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 /**
       
    23  @file
       
    24  @internalComponent
       
    25  @released
       
    26 */
       
    27 
       
    28 #ifndef TKEYDETAILS_H
       
    29 #define TKEYDETAILS_H
       
    30 
       
    31 #include <e32base.h>
       
    32 #include <mctkeystore.h>
       
    33 
       
    34 class CKeyDetails : public CKeyInfoBase
       
    35 	{
       
    36 public:
       
    37 
       
    38 	static CKeyDetails* NewL(	TInt aHandle, const TDesC& aLabel, 
       
    39 								const TDesC8& aPrivateKey, const TDesC8& aPublicKey );
       
    40 	static CKeyDetails* NewL(RStoreReadStream& aReadStream);
       
    41 	~CKeyDetails();
       
    42 
       
    43 public:
       
    44 	/** Get the handle of the key. */
       
    45 	TInt Handle() const;
       
    46 	HBufC8* PrivateKey() const;
       
    47 	HBufC8* PublicKey() const;
       
    48 	void ExternalizeL(RWriteStream&) const;
       
    49 	
       
    50 private:
       
    51 	void ConstructL(TInt aHandle, const TDesC& aLabel,const TDesC8& aPrivateKey, const TDesC8& aPublicKey );
       
    52 	CKeyDetails();
       
    53 	void InternalizeL(RReadStream& aReadStream);
       
    54 	
       
    55 private:
       
    56 	HBufC8* iPrivateKey;
       
    57 	HBufC8* iPublicKey;
       
    58 	};
       
    59 
       
    60 #endif // TKEYDETAILS_H