sl@0: /* sl@0: * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * Defines the class which represents the structure of the key on sl@0: * which Crypto Token HAI internally operates. It contains the key sl@0: * information relevant to Crypto Token HAI. sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalComponent sl@0: @released sl@0: */ sl@0: sl@0: #ifndef TKEYDETAILS_H sl@0: #define TKEYDETAILS_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: class CKeyDetails : public CKeyInfoBase sl@0: { sl@0: public: sl@0: static CKeyDetails* NewL( TInt aHandle, const TDesC& aLabel, sl@0: const TDesC8& aPrivateKey, const TDesC8& aPublicKey ); sl@0: static CKeyDetails* NewL(RStoreReadStream& aReadStream); sl@0: ~CKeyDetails(); sl@0: sl@0: public: sl@0: /** Get the handle of the key. */ sl@0: TInt Handle() const; sl@0: HBufC8* PrivateKey() const; sl@0: HBufC8* PublicKey() const; sl@0: void ExternalizeL(RWriteStream&) const; sl@0: sl@0: private: sl@0: CKeyDetails(TKeyIdentifier aID, sl@0: TKeyUsagePKCS15 aUsage, sl@0: TUint aSize, sl@0: HBufC* aLabel, sl@0: TInt aHandle, sl@0: const TSecurityPolicy& aUsePolicy, sl@0: const TSecurityPolicy& aManagementPolicy, sl@0: EKeyAlgorithm aAlgorithm, sl@0: TInt aAccessType, sl@0: TBool aNative, sl@0: TTime aStartDate, sl@0: TTime aEndDate, sl@0: HBufC8* aPKCS8AttributeSet); sl@0: sl@0: void ConstructL(const TDesC8& aPrivateKey, const TDesC8& aPublicKey ); sl@0: void ConstructL( RStoreReadStream& aReadStream); sl@0: CKeyDetails(); sl@0: void InternalizeL(RReadStream& aReadStream); sl@0: sl@0: private: sl@0: HBufC8* iPrivateKey; sl@0: HBufC8* iPublicKey; sl@0: }; sl@0: sl@0: #endif // TKEYDETAILS_H