CryptoObject Class Reference

Inheritance diagram for CryptoObject:

Inheritance graph
[legend]
List of all members.

Detailed Description

The CryptoObject interface applies to just about everything on the card


Public Member Functions

virtual const char * getDescription ()=0
virtual CK_OBJECT_HANDLE getHandle ()=0
virtual CK_ATTRIBUTE * getAttribute (CK_ATTRIBUTE_TYPE type)=0
virtual map< CK_ATTRIBUTE_TYPE,
CK_ATTRIBUTE * > 
getAttributes ()=0
virtual CK_OBJECT_CLASS getClass ()=0
virtual CK_ATTRIBUTE * matchAttribute (CK_ATTRIBUTE *attrib)=0
virtual bool doAllAttribsMatch (CK_ATTRIBUTE *attributes, CK_ULONG numAttribs)=0


Member Function Documentation

virtual const char* CryptoObject::getDescription  )  [pure virtual]
 

Returns:
a distinguishing description for this object

Implemented in CardCapabilityContainer, FingerPrintObject, PivMechanism, PrivateKey, PublicKey, X509Certificate, X509ForCardAuth, X509ForDigitalSig, X509ForKeyMan, and X509ForPivAuth.

virtual CK_OBJECT_HANDLE CryptoObject::getHandle  )  [pure virtual]
 

Returns:
The cryptoki object handle

Implemented in GenericCryptoObject.

virtual CK_ATTRIBUTE* CryptoObject::getAttribute CK_ATTRIBUTE_TYPE  type  )  [pure virtual]
 

this method returns an CK_ATTRIBUTE* so that you can retrieve the value. Since values can be of arbitrary length, the whole struct must be returned.

Parameters:
type the type of attribute being sought.
Returns:
A pointer the attribute object for the type searched for. NULL if it doesn't exist

Implemented in GenericCryptoObject.

virtual map<CK_ATTRIBUTE_TYPE,CK_ATTRIBUTE*> CryptoObject::getAttributes  )  [pure virtual]
 

Returns:
a map of all attributes this object posseses.

Implemented in GenericCryptoObject.

virtual CK_OBJECT_CLASS CryptoObject::getClass  )  [pure virtual]
 

Returns:
the CRYPTOKI class type for this object
See also:
pkcs11t.h

Implemented in CardCapabilityContainer, FingerPrintObject, GenericCryptoObject, Key, PivMechanism, PrivateKey, PublicKey, and X509Certificate.

virtual CK_ATTRIBUTE* CryptoObject::matchAttribute CK_ATTRIBUTE *  attrib  )  [pure virtual]
 

This method is slightly different than 'getAttribute'. Not only does it get the attribute and check for NULL, it also compares the values and lengths. If the the type, length and value all match, the attrib is returned.

Parameters:
attrib the param being sought
Returns:
the attribute found only if it's an exact match

Implemented in GenericCryptoObject.

virtual bool CryptoObject::doAllAttribsMatch CK_ATTRIBUTE *  attributes,
CK_ULONG  numAttribs
[pure virtual]
 

Parameters:
attributes the attributes being sought
numAttribs the number of attribtues in the array
Returns:
true if all attributes 'match' as per 'matchAttribute'

Implemented in GenericCryptoObject.


Generated on Fri Jan 12 15:48:43 2007 for NIST_PKCS11 by doxygen 1.3.1 using KingsTools