cryptomgmtlibs/cryptotokenfw/inc_interfaces/MCTKeyStore_v2.inl
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:40:57 +0100
branchRCL_3
changeset 96 a71299154b21
parent 30 cf642210ecb7
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201035 Kit: 201035

/*
* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
* MCTKeyStore.inl
* CKeyInfoBase
*
*/

/**
 @file 
 @publishedPartner
 @released
*/

inline TKeyIdentifier CKeyInfoBase::ID() const
	{
	return iID;
	}

inline TKeyUsagePKCS15 CKeyInfoBase::Usage() const
	{
	return iUsage;
	}

inline TUint CKeyInfoBase::Size() const
	{
	return iSize;
	}

inline const TDesC& CKeyInfoBase::Label() const
	{	
	if (iLabel)
		return *iLabel;
	else
		return KNullDesC;
	}

inline const TSecurityPolicy& CKeyInfoBase::UsePolicy() const
	{
	return iUsePolicy;
	}

inline const TSecurityPolicy& CKeyInfoBase::ManagementPolicy() const
	{
	return iManagementPolicy;
	}

inline CKeyInfoBase::EKeyAlgorithm CKeyInfoBase::Algorithm() const
	{
	return iAlgorithm;
	}

inline TInt CKeyInfoBase::AccessType() const
	{
	return iAccessType;
	}

inline TBool CKeyInfoBase::Native() const
	{
	return iNative;
	}

inline TTime CKeyInfoBase::StartDate() const
	{
	return iStartDate;
	}

inline TTime CKeyInfoBase::EndDate() const
	{
	return iEndDate;
	}

inline const TDesC8& CKeyInfoBase::PKCS8AttributeSet() const
	{
	if (iPKCS8AttributeSet)
		return *iPKCS8AttributeSet;
	else
		return KNullDesC8;
	}

inline TInt CKeyInfoBase::HandleID() const
	{
	return iHandle;
	}

inline void CKeyInfoBase::SetHandle(TInt aHandle)
	{
	iHandle = aHandle;
	}

inline void CKeyInfoBase::SetIdentifier(TKeyIdentifier aId)
	{
	iID = aId;
	}

inline void CKeyInfoBase::SetSize(TUint aSize)
	{
	iSize = aSize;
	}

inline void CKeyInfoBase::SetAlgorithm(EKeyAlgorithm aAlg)
	{
	iAlgorithm = aAlg;
	}

// CCTKeyInfo

inline CCTKeyInfo::operator TCTTokenObjectHandle() const
	{
	return Handle();
	}

inline MCTAuthenticationObject* CCTKeyInfo::Protector() const
	{
	return iProtector;
	}

inline void CCTKeyInfo::SetProtector(MCTAuthenticationObject& aProtector)
	{
	iProtector = &aProtector;
	}