CPKIFCryptoPPKeyMaterial Class Reference

#include <PKIFCryptoPPKeyMaterial.h>

Inheritance diagram for CPKIFCryptoPPKeyMaterial:

Inheritance graph
[legend]
Collaboration diagram for CPKIFCryptoPPKeyMaterial:

Collaboration graph
[legend]

List of all members.


Detailed Description

Interface: Module

This CPKIFKeyMaterial subclass stores public keys as a raw, encoded subjectPublicKeyInfo. That expedites signature processing in crypto++.

TSP-enforcing: No

Definition at line 29 of file PKIFCryptoPPKeyMaterial.h.


Public Member Functions

 CPKIFCryptoPPKeyMaterial (void)
 CPKIFCryptoPPKeyMaterial (const CPKIFCertificate &cert)
 CPKIFCryptoPPKeyMaterial (CPKIFSubjectPublicKeyInfoPtr &spki)
 CPKIFCryptoPPKeyMaterial (const CPKIFKeyMaterial &km)
 ~CPKIFCryptoPPKeyMaterial (void)
CPKIFBufferPtr GetRawSPKI (void) const
const CPKIFAlgorithmGetKeyAlg (void) const
void SetRawSPKI (const CPKIFBufferPtr &)
void SetKeyAlg (const CPKIFAlgorithm *)
bool HasParams () const

Protected Member Functions

void InitWithKeyMaterial (const CPKIFKeyMaterial &km)
void InitWithSPKI (CPKIFSubjectPublicKeyInfoPtr &spki)
void InitWithCert (const CPKIFCertificate &cert)

Protected Attributes

CPKIFBufferPtr m_rawSPKI
const CPKIFAlgorithmm_alg
bool m_hasParams

Constructor & Destructor Documentation

CPKIFCryptoPPKeyMaterial::CPKIFCryptoPPKeyMaterial ( void   ) 

Interface: Module

Construct and initialize an empty CPKIFCryptoPPKeyMaterial object

Returns:
None

Definition at line 38 of file PKIFCryptoPPKeyMaterial.cpp.

CPKIFCryptoPPKeyMaterial::CPKIFCryptoPPKeyMaterial ( const CPKIFCertificate cert  ) 

Interface: Module

Construct and initialize a CPKIFCryptoPPKeyMaterial given a certificate

Returns:
None

Definition at line 61 of file PKIFCryptoPPKeyMaterial.cpp.

References InitWithCert().

CPKIFCryptoPPKeyMaterial::CPKIFCryptoPPKeyMaterial ( CPKIFSubjectPublicKeyInfoPtr &  spki  ) 

Interface: Module

Construct and initialize a CPKIFCryptoPPKeyMaterial given a subjectPublicKeyInfo

Returns:
None

Definition at line 74 of file PKIFCryptoPPKeyMaterial.cpp.

References InitWithSPKI().

CPKIFCryptoPPKeyMaterial::CPKIFCryptoPPKeyMaterial ( const CPKIFKeyMaterial km  ) 

Interface: Module

Construct and initialize a CPKIFCryptoPPKeyMaterial given some other kind of CPKIFKeyMaterial

Returns:
None

Definition at line 87 of file PKIFCryptoPPKeyMaterial.cpp.

References InitWithKeyMaterial().

CPKIFCryptoPPKeyMaterial::~CPKIFCryptoPPKeyMaterial ( void   ) 

Interface: Module

Since the only members are a smart pointer and a pointer we don't own, the destructor is a nop.

Returns:
None

Definition at line 50 of file PKIFCryptoPPKeyMaterial.cpp.


Member Function Documentation

CPKIFBufferPtr CPKIFCryptoPPKeyMaterial::GetRawSPKI ( void   )  const

Interface: Module

Helper function that returns der-encoded subjectPublicKeyInfo

Returns:
a buffer containing the der-encoded subjectPublicKeyInfo

Definition at line 100 of file PKIFCryptoPPKeyMaterial.cpp.

References m_rawSPKI.

const CPKIFAlgorithm * CPKIFCryptoPPKeyMaterial::GetKeyAlg ( void   )  const

Interface: Module

Helper function that returns a CPKIFAlgorithm object describing the associated key's algorithm

Returns:
a pointer to the CPKIFAlgorithm object that describes the associated key's algorithm

Definition at line 112 of file PKIFCryptoPPKeyMaterial.cpp.

References m_alg.

void CPKIFCryptoPPKeyMaterial::SetRawSPKI ( const CPKIFBufferPtr &  key  ) 

Interface: Module

Set the public key material for this object

Returns:
none
Parameters:
key  [in] a buffer containing a der-encoded subjectPublicKeyInfo structure

Definition at line 124 of file PKIFCryptoPPKeyMaterial.cpp.

References BitsToBytes(), CACASNWRAPPER_CREATE, CPKIFAlgorithm::GetAlg(), m_hasParams, m_rawSPKI, PKIF_CRYPTOPP_RAW_IMPORT_FAILED, SetKeyAlg(), CPKIFKeyMaterial::SetSubjectPublicKeyInfo(), and TOOLKIT_CRYPTO_CRYPTOPPRAW.

void CPKIFCryptoPPKeyMaterial::SetKeyAlg ( const CPKIFAlgorithm alg  ) 

Interface: Module

Set the algorithm description for this object. The supplied algorithm description should be obtained using one of the static methods of the CPKIFAlgorithm class; it will not be freed here!

Returns:
None
Parameters:
alg  [in] a pointer to a CPKIFAlgorithm object describing this key material

Definition at line 164 of file PKIFCryptoPPKeyMaterial.cpp.

References m_alg.

Referenced by SetRawSPKI().

bool CPKIFCryptoPPKeyMaterial::HasParams (  )  const

Interface: Module

Returns:
true or false

Definition at line 274 of file PKIFCryptoPPKeyMaterial.cpp.

References m_hasParams.

void CPKIFCryptoPPKeyMaterial::InitWithKeyMaterial ( const CPKIFKeyMaterial km  )  [protected]

void CPKIFCryptoPPKeyMaterial::InitWithSPKI ( CPKIFSubjectPublicKeyInfoPtr &  spki  )  [protected]

void CPKIFCryptoPPKeyMaterial::InitWithCert ( const CPKIFCertificate cert  )  [protected]

Interface: Module

Returns:
N/A

Definition at line 251 of file PKIFCryptoPPKeyMaterial.cpp.

References CPKIFCertificate::GetSubjectPublicKeyInfo(), and InitWithSPKI().

Referenced by CPKIFCryptoPPKeyMaterial(), and InitWithKeyMaterial().


Member Data Documentation

CPKIFBufferPtr CPKIFCryptoPPKeyMaterial::m_rawSPKI [protected]

Definition at line 52 of file PKIFCryptoPPKeyMaterial.h.

Referenced by GetRawSPKI(), InitWithSPKI(), and SetRawSPKI().

Definition at line 53 of file PKIFCryptoPPKeyMaterial.h.

Referenced by GetKeyAlg(), InitWithSPKI(), and SetKeyAlg().

Definition at line 54 of file PKIFCryptoPPKeyMaterial.h.

Referenced by HasParams(), InitWithSPKI(), and SetRawSPKI().


The documentation for this class was generated from the following files:

Generated on Mon Nov 15 11:20:12 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6