os/security/cryptoservices/filebasedcertificateandkeystores/test/thwkeystore/common/tkeydetails.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptoservices/filebasedcertificateandkeystores/test/thwkeystore/common/tkeydetails.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,74 @@
     1.4 +/*
     1.5 +* Copyright (c) 2009 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 +* Defines the class which represents the structure of the key on 
    1.19 +* which Crypto Token HAI internally operates. It contains the key 
    1.20 +* information relevant to Crypto Token HAI.
    1.21 +*
    1.22 +*/
    1.23 +
    1.24 +
    1.25 +/**
    1.26 + @file
    1.27 + @internalComponent
    1.28 + @released
    1.29 +*/
    1.30 +
    1.31 +#ifndef TKEYDETAILS_H
    1.32 +#define TKEYDETAILS_H
    1.33 +
    1.34 +#include <e32base.h>
    1.35 +#include <mctkeystore.h>
    1.36 +
    1.37 +class CKeyDetails : public CKeyInfoBase
    1.38 +	{
    1.39 +public:
    1.40 +	static CKeyDetails* NewL(	TInt aHandle, const TDesC& aLabel, 
    1.41 +								const TDesC8& aPrivateKey, const TDesC8& aPublicKey );
    1.42 +	static CKeyDetails* NewL(RStoreReadStream& aReadStream);
    1.43 +	~CKeyDetails();
    1.44 +
    1.45 +public:
    1.46 +	/** Get the handle of the key. */
    1.47 +	TInt Handle() const;
    1.48 +	HBufC8* PrivateKey() const;
    1.49 +	HBufC8* PublicKey() const;
    1.50 +	void ExternalizeL(RWriteStream&) const;
    1.51 +	
    1.52 +private:
    1.53 +	CKeyDetails(TKeyIdentifier aID,
    1.54 +				TKeyUsagePKCS15 aUsage,
    1.55 +				TUint aSize, 
    1.56 +				HBufC* aLabel,
    1.57 +				TInt aHandle,
    1.58 +				const TSecurityPolicy& aUsePolicy,
    1.59 +				const TSecurityPolicy& aManagementPolicy,
    1.60 +				EKeyAlgorithm aAlgorithm,
    1.61 +				TInt aAccessType,
    1.62 +				TBool aNative,
    1.63 +				TTime aStartDate,
    1.64 +				TTime aEndDate,
    1.65 +				HBufC8* aPKCS8AttributeSet);
    1.66 +		
    1.67 +	void ConstructL(const TDesC8& aPrivateKey, const TDesC8& aPublicKey );
    1.68 +	void ConstructL( RStoreReadStream& aReadStream);
    1.69 +	CKeyDetails();
    1.70 +	void InternalizeL(RReadStream& aReadStream);
    1.71 +	
    1.72 +private:
    1.73 +	HBufC8* iPrivateKey;
    1.74 +	HBufC8* iPublicKey;
    1.75 +	};
    1.76 +
    1.77 +#endif // TKEYDETAILS_H