CKeyInfoBase Class Reference

class CKeyInfoBase : protected CBase

Base class for CCTKeyInfo .

Inherits from

Public Member Functions
TInt AccessType ()
EKeyAlgorithm Algorithm ()
TTime EndDate ()
IMPORT_C void ExternalizeL ( RWriteStream &)
TInt HandleID ()
TKeyIdentifier ID ()
const TDesC & Label ()
const TSecurityPolicy & ManagementPolicy ()
TBool Native ()
const TDesC8 & PKCS8AttributeSet ()
void SetAlgorithm ( EKeyAlgorithm )
void SetHandle ( TInt )
void SetIdentifier ( TKeyIdentifier )
void SetSize ( TUint )
TUint Size ()
TTime StartDate ()
TKeyUsagePKCS15 Usage ()
const TSecurityPolicy & UsePolicy ()
Protected Member Functions
CKeyInfoBase ( TKeyIdentifier , TKeyUsagePKCS15 , TUint , HBufC *, TInt , const TSecurityPolicy &, const TSecurityPolicy &, EKeyAlgorithm , TInt , TBool , TTime , TTime , HBufC8 *)
CKeyInfoBase ()
~CKeyInfoBase ()
IMPORT_C void ConstructL ()
IMPORT_C void ConstructL ( RReadStream &)
Private Member Functions
void InternalizeL ( RReadStream &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enum EKeyAccess {
EInvalidAccess  = 0x00, ESensitive  = 0x01, EExtractable  = 0x02, EAlwaysSensitive  = 0x04, ENeverExtractable  = 0x08, ELocal  = 0x10
}
enum EKeyAlgorithm { EInvalidAlgorithm  = 0, ERSA  = 1, EDSA  = 2, EDH  = 3 }
Protected Attributes
TInt iAccessType
EKeyAlgorithm iAlgorithm
TTime iEndDate
TInt iHandle
TKeyIdentifier iID
HBufC * iLabel
TSecurityPolicy iManagementPolicy
TBool iNative
HBufC8 * iPKCS8AttributeSet
TUint iSize
TTime iStartDate
TKeyUsagePKCS15 iUsage
TSecurityPolicy iUsePolicy

Constructor & Destructor Documentation

CKeyInfoBase(TKeyIdentifier, TKeyUsagePKCS15, TUint, HBufC *, TInt, const TSecurityPolicy &, const TSecurityPolicy &, EKeyAlgorithm, TInt, TBool, TTime, TTime, HBufC8 *)

IMPORT_C CKeyInfoBase ( TKeyIdentifier aID,
TKeyUsagePKCS15 aUsage,
TUint aSize,
HBufC * aLabel,
TInt aHandle,
const TSecurityPolicy & aUsePolicy,
const TSecurityPolicy & aManagementPolicy,
EKeyAlgorithm aAlgorithm,
TInt aAccessType,
TBool aNative,
TTime aStartDate,
TTime aEndDate,
HBufC8 * aPKCS8AttributeSet
) [protected]

Protected constructor, called by derived classes.

Parameters

TKeyIdentifier aID
TKeyUsagePKCS15 aUsage
TUint aSize
HBufC * aLabel
TInt aHandle
const TSecurityPolicy & aUsePolicy
const TSecurityPolicy & aManagementPolicy
EKeyAlgorithm aAlgorithm
TInt aAccessType
TBool aNative
TTime aStartDate
TTime aEndDate
HBufC8 * aPKCS8AttributeSet

CKeyInfoBase()

IMPORT_C CKeyInfoBase ( ) [protected]

Protected constructor, called by derived classes.

~CKeyInfoBase()

IMPORT_C ~CKeyInfoBase ( ) [protected]

Destructor is protected so CCTKeyInfo can force users to call Release.

Member Functions Documentation

AccessType()

TInt AccessType ( ) const [inline]

The key access type. The return code is bitfield made up of 0 or more values from EKeyAccess ORed together.

Algorithm()

EKeyAlgorithm Algorithm ( ) const [inline]

ConstructL()

IMPORT_C void ConstructL ( ) [protected]

Second phase constructor. Called by derived classes' NewL methods.

ConstructL(RReadStream &)

IMPORT_C void ConstructL ( RReadStream & aIn ) [protected]

Second phase constructor. Called by derived classes' NewL methods.

Parameters

RReadStream & aIn

EndDate()

TTime EndDate ( ) const [inline]

ExternalizeL(RWriteStream &)

IMPORT_C void ExternalizeL ( RWriteStream & aStream ) const

Externalizes the key data to stream

Parameters

RWriteStream & aStream

HandleID()

TInt HandleID ( ) const [inline]

Get the handle of the key. This is a identifier that uniquely identifies the key within one store, and is used to construct the token handle.

ID()

TKeyIdentifier ID ( ) const [inline]

InternalizeL(RReadStream &)

void InternalizeL ( RReadStream & aStream ) [private]

Internalizes key data from a stream.

Parameters

RReadStream & aStream

Label()

const TDesC & Label ( ) const [inline]

ManagementPolicy()

const TSecurityPolicy & ManagementPolicy ( ) const [inline]

Native()

TBool Native ( ) const [inline]

Returns whether the key is native.

A native key is one where operations on the key are performed on the same hardware as the the key is stored. For instance, if a key that is stored on secure hardware but calculations are carried out on the main processor, it isn't native.

PKCS8AttributeSet()

const TDesC8 & PKCS8AttributeSet ( ) const [inline]

SetAlgorithm(EKeyAlgorithm)

void SetAlgorithm ( EKeyAlgorithm aAlg ) [inline]

Set the key algorithm.

Parameters

EKeyAlgorithm aAlg

SetHandle(TInt)

void SetHandle ( TInt aHandle ) [inline]

Set the handle of the key. Called by the token when a key is created.

Parameters

TInt aHandle The new handle of the key

SetIdentifier(TKeyIdentifier)

void SetIdentifier ( TKeyIdentifier aId ) [inline]

Called by the token when a key is created, to set the key identifier (SHA-1 hash) of the new key

Parameters

TKeyIdentifier aId The newly generated SHA-1 hash

SetSize(TUint)

void SetSize ( TUint aSize ) [inline]

Set the size of a key.

Parameters

TUint aSize

Size()

TUint Size ( ) const [inline]

StartDate()

TTime StartDate ( ) const [inline]

Usage()

TKeyUsagePKCS15 Usage ( ) const [inline]

UsePolicy()

const TSecurityPolicy & UsePolicy ( ) const [inline]

Member Enumerations Documentation

Enum EKeyAccess

Flags for key access bitfield.

Enumerators

EInvalidAccess = 0x00
ESensitive = 0x01
EExtractable = 0x02
EAlwaysSensitive = 0x04
ENeverExtractable = 0x08
ELocal = 0x10

Enum EKeyAlgorithm

Key algorithms.

Enumerators

EInvalidAlgorithm = 0
ERSA = 1
EDSA = 2
EDH = 3

Member Data Documentation

TInt iAccessType

TInt iAccessType [protected]

EKeyAlgorithm iAlgorithm

EKeyAlgorithm iAlgorithm [protected]

TTime iEndDate

TTime iEndDate [protected]

TInt iHandle

TInt iHandle [protected]

TKeyIdentifier iID

TKeyIdentifier iID [protected]

HBufC * iLabel

HBufC * iLabel [protected]

TSecurityPolicy iManagementPolicy

TSecurityPolicy iManagementPolicy [protected]

TBool iNative

TBool iNative [protected]

HBufC8 * iPKCS8AttributeSet

HBufC8 * iPKCS8AttributeSet [protected]

TUint iSize

TUint iSize [protected]

TTime iStartDate

TTime iStartDate [protected]

TKeyUsagePKCS15 iUsage

TKeyUsagePKCS15 iUsage [protected]

TSecurityPolicy iUsePolicy

TSecurityPolicy iUsePolicy [protected]