os/security/cryptomgmtlibs/cryptotokenfw/inc_interfaces/MCTKeyStore_v2.inl
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of the License "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description: 
sl@0
    15
* MCTKeyStore.inl
sl@0
    16
* CKeyInfoBase
sl@0
    17
*
sl@0
    18
*/
sl@0
    19
sl@0
    20
/**
sl@0
    21
 @file 
sl@0
    22
 @publishedPartner
sl@0
    23
 @released
sl@0
    24
*/
sl@0
    25
sl@0
    26
inline TKeyIdentifier CKeyInfoBase::ID() const
sl@0
    27
	{
sl@0
    28
	return iID;
sl@0
    29
	}
sl@0
    30
sl@0
    31
inline TKeyUsagePKCS15 CKeyInfoBase::Usage() const
sl@0
    32
	{
sl@0
    33
	return iUsage;
sl@0
    34
	}
sl@0
    35
sl@0
    36
inline TUint CKeyInfoBase::Size() const
sl@0
    37
	{
sl@0
    38
	return iSize;
sl@0
    39
	}
sl@0
    40
sl@0
    41
inline const TDesC& CKeyInfoBase::Label() const
sl@0
    42
	{	
sl@0
    43
	if (iLabel)
sl@0
    44
		return *iLabel;
sl@0
    45
	else
sl@0
    46
		return KNullDesC;
sl@0
    47
	}
sl@0
    48
sl@0
    49
inline const TSecurityPolicy& CKeyInfoBase::UsePolicy() const
sl@0
    50
	{
sl@0
    51
	return iUsePolicy;
sl@0
    52
	}
sl@0
    53
sl@0
    54
inline const TSecurityPolicy& CKeyInfoBase::ManagementPolicy() const
sl@0
    55
	{
sl@0
    56
	return iManagementPolicy;
sl@0
    57
	}
sl@0
    58
sl@0
    59
inline CKeyInfoBase::EKeyAlgorithm CKeyInfoBase::Algorithm() const
sl@0
    60
	{
sl@0
    61
	return iAlgorithm;
sl@0
    62
	}
sl@0
    63
sl@0
    64
inline TInt CKeyInfoBase::AccessType() const
sl@0
    65
	{
sl@0
    66
	return iAccessType;
sl@0
    67
	}
sl@0
    68
sl@0
    69
inline TBool CKeyInfoBase::Native() const
sl@0
    70
	{
sl@0
    71
	return iNative;
sl@0
    72
	}
sl@0
    73
sl@0
    74
inline TTime CKeyInfoBase::StartDate() const
sl@0
    75
	{
sl@0
    76
	return iStartDate;
sl@0
    77
	}
sl@0
    78
sl@0
    79
inline TTime CKeyInfoBase::EndDate() const
sl@0
    80
	{
sl@0
    81
	return iEndDate;
sl@0
    82
	}
sl@0
    83
sl@0
    84
inline const TDesC8& CKeyInfoBase::PKCS8AttributeSet() const
sl@0
    85
	{
sl@0
    86
	if (iPKCS8AttributeSet)
sl@0
    87
		return *iPKCS8AttributeSet;
sl@0
    88
	else
sl@0
    89
		return KNullDesC8;
sl@0
    90
	}
sl@0
    91
sl@0
    92
inline TInt CKeyInfoBase::HandleID() const
sl@0
    93
	{
sl@0
    94
	return iHandle;
sl@0
    95
	}
sl@0
    96
sl@0
    97
inline void CKeyInfoBase::SetHandle(TInt aHandle)
sl@0
    98
	{
sl@0
    99
	iHandle = aHandle;
sl@0
   100
	}
sl@0
   101
sl@0
   102
inline void CKeyInfoBase::SetIdentifier(TKeyIdentifier aId)
sl@0
   103
	{
sl@0
   104
	iID = aId;
sl@0
   105
	}
sl@0
   106
sl@0
   107
inline void CKeyInfoBase::SetSize(TUint aSize)
sl@0
   108
	{
sl@0
   109
	iSize = aSize;
sl@0
   110
	}
sl@0
   111
sl@0
   112
inline void CKeyInfoBase::SetAlgorithm(EKeyAlgorithm aAlg)
sl@0
   113
	{
sl@0
   114
	iAlgorithm = aAlg;
sl@0
   115
	}
sl@0
   116
sl@0
   117
// CCTKeyInfo
sl@0
   118
sl@0
   119
inline CCTKeyInfo::operator TCTTokenObjectHandle() const
sl@0
   120
	{
sl@0
   121
	return Handle();
sl@0
   122
	}
sl@0
   123
sl@0
   124
inline MCTAuthenticationObject* CCTKeyInfo::Protector() const
sl@0
   125
	{
sl@0
   126
	return iProtector;
sl@0
   127
	}
sl@0
   128
sl@0
   129
inline void CCTKeyInfo::SetProtector(MCTAuthenticationObject& aProtector)
sl@0
   130
	{
sl@0
   131
	iProtector = &aProtector;
sl@0
   132
	}