Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

DSIGKeyInfoList Class Reference
[Main Signature API]

#include <DSIGKeyInfoList.hpp>

Collaboration diagram for DSIGKeyInfoList:

Collaboration graph
[legend]
List of all members.

Detailed Description

Container class for KeyInfo elements.

The library stores KeyInfo lists using this class.


Public Types

typedef std::vector< DSIGKeyInfo * > KeyInfoListVectorType
typedef size_t size_type

Public Member Functions

Constructors and Destructors
 DSIGKeyInfoList (const XSECEnv *env)
 Main constructor.
 ~DSIGKeyInfoList ()
 Destructor.
Public (API) functions
size_t getSize ()
 Get size of list.
DSIGKeyInfoitem (size_type index)
Manipulate the List
void addKeyInfo (DSIGKeyInfo *ref)
 Add an already created KeyInfo.
void addAndInsertKeyInfo (DSIGKeyInfo *ref)
 Add an already created KeyInfo.
bool addXMLKeyInfo (XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *ki)
 Read from DOM and create.
bool loadListFromXML (XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *node)
 Read full list from DOM.
DSIGKeyInforemoveKeyInfo (size_type index)
void setEnvironment (const XSECEnv *env)
 Set the overarching environment.
void empty ()
 Clear out the list.
bool isEmpty ()
 Is the list empty?
Create new KeyInfo elements
XERCES_CPP_NAMESPACE_QUALIFIER
DOMElement * 
createKeyInfo (void)
 Create basic KeyInfo element.
DSIGKeyInfoValueappendDSAKeyValue (const XMLCh *P, const XMLCh *Q, const XMLCh *G, const XMLCh *Y)
 Append a DSA KeyValue element.
DSIGKeyInfoValueappendRSAKeyValue (const XMLCh *modulus, const XMLCh *exponent)
 Append a RSA KeyValue element.
DSIGKeyInfoX509appendX509Data (void)
 Append a X509Data element.
DSIGKeyInfoNameappendKeyName (const XMLCh *name, bool isDName=false)
 Append a KeyName element.
DSIGKeyInfoPGPDataappendPGPData (const XMLCh *id, const XMLCh *packet)
 Append a PGPData element.
DSIGKeyInfoSPKIDataappendSPKIData (const XMLCh *sexp)
 Append a SPKIData element.
DSIGKeyInfoMgmtDataappendMgmtData (const XMLCh *data)
 Append a MgmtData element.


Member Typedef Documentation

typedef std::vector<DSIGKeyInfo *> DSIGKeyInfoList::KeyInfoListVectorType
 

typedef size_t DSIGKeyInfoList::size_type
 


Constructor & Destructor Documentation

DSIGKeyInfoList::DSIGKeyInfoList const XSECEnv env  ) 
 

Main constructor.

Main constructor called by DSIGSignature

Note:
Should only ever be created by a Signature or Cipher class.
Parameters:
env The environment the KeyInfo is operating within

DSIGKeyInfoList::~DSIGKeyInfoList  ) 
 

Destructor.


Member Function Documentation

void DSIGKeyInfoList::addAndInsertKeyInfo DSIGKeyInfo ref  ) 
 

Add an already created KeyInfo.

Adds a KeyInfo element that has already been built into the list.

Note:
This method finds the DOM node of the KeyInfo and inserts it into the <KeyInfo/> list in the DOM.
Parameters:
ref The KeyInfo to add

void DSIGKeyInfoList::addKeyInfo DSIGKeyInfo ref  ) 
 

Add an already created KeyInfo.

Adds a KeyInfo element that has already been built into the list.

Note:
This method does not insert the KeyInfo into the DOM structure - it assumes it is already there and just adds to the list.
Parameters:
ref The KeyInfo to add

bool DSIGKeyInfoList::addXMLKeyInfo XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *  ki  ) 
 

Read from DOM and create.

Uses a DOMNode pointing to the start of the KeyInfo element to build a new KeyInfo and then add it to the list

Note:
This is an internal function and should not be called directly
Parameters:
ki Head of DOM structure with the KeyInfo
Returns:
true if successfully loaded

DSIGKeyInfoValue* DSIGKeyInfoList::appendDSAKeyValue const XMLCh *  P,
const XMLCh *  Q,
const XMLCh *  G,
const XMLCh *  Y
 

Append a DSA KeyValue element.

Add a new KeyInfo element for a DSA Value

Parameters:
P Base64 encoded value of P
Q Base64 encoded value of Q
G Base64 encoded value of G
Y Base64 encoded value of Y
Returns:
A pointer to the created object.

DSIGKeyInfoName* DSIGKeyInfoList::appendKeyName const XMLCh *  name,
bool  isDName = false
 

Append a KeyName element.

Add a new KeyInfo element for a key name.

Parameters:
name The name of the key to set in the XML
isDName Treat the name as a Distinguished name and encode accordingly
Returns:
A pointer to the created object

DSIGKeyInfoMgmtData* DSIGKeyInfoList::appendMgmtData const XMLCh *  data  ) 
 

Append a MgmtData element.

Add a new KeyInfo element for Management Data

Parameters:
data The string to set in the MgmtData element
Returns:
A pointer to the created object

DSIGKeyInfoPGPData* DSIGKeyInfoList::appendPGPData const XMLCh *  id,
const XMLCh *  packet
 

Append a PGPData element.

Add a new KeyInfo element for a PGP key.

Parameters:
id The ID of the key to set in the XML (base64 encoded - NULL if none)
packet The Packet information to set in the XML (base64 encoded - NULL if none)
Returns:
A pointer to the created object

DSIGKeyInfoValue* DSIGKeyInfoList::appendRSAKeyValue const XMLCh *  modulus,
const XMLCh *  exponent
 

Append a RSA KeyValue element.

Add a new KeyInfo element for a RSA Value

Parameters:
modulus Base64 encoded value of the modulus
exponent Base64 encoded value of exponent
Returns:
A pointer to the created object.

DSIGKeyInfoSPKIData* DSIGKeyInfoList::appendSPKIData const XMLCh *  sexp  ) 
 

Append a SPKIData element.

Add a new KeyInfo element for a set of SPKI S-expressions

Parameters:
sexp The initial S-expression to set in the SPKIData element
Returns:
A pointer to the created object

DSIGKeyInfoX509* DSIGKeyInfoList::appendX509Data void   ) 
 

Append a X509Data element.

Add a new KeyInfo element for X509 data.

Note:
The added element is empty. The caller must make use of the returned object to set the required values.
Returns:
A pointer to the created object.

XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* DSIGKeyInfoList::createKeyInfo void   ) 
 

Create basic KeyInfo element.

Creates the basic KeyInfo node that can then be used to embed specific KeyInfo types

void DSIGKeyInfoList::empty  ) 
 

Clear out the list.

Removes all elements from the list

Note:
Deletes the items themselves as well as clearing the list.

size_t DSIGKeyInfoList::getSize  ) 
 

Get size of list.

Returns:
the number of elements in the list

bool DSIGKeyInfoList::isEmpty  ) 
 

Is the list empty?

Returns:
true Iff there are no elements in the list

DSIGKeyInfo* DSIGKeyInfoList::item size_type  index  ) 
 

bool DSIGKeyInfoList::loadListFromXML XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *  node  ) 
 

Read full list from DOM.

Will take the starting node of a KeyInfo list and read into the list structure. This is a bit different from other "load" functions, in that it takes a node as a parameter.

Note:
This is an internal functions and should not be called directly
Parameters:
node The <KeyInfo> element node to read from

DSIGKeyInfo* DSIGKeyInfoList::removeKeyInfo size_type  index  ) 
 

void DSIGKeyInfoList::setEnvironment const XSECEnv env  )  [inline]
 

Set the overarching environment.

Sets the environment this list is operating within

Parameters:
env Operating environment


The documentation for this class was generated from the following file:
Generated on Sun Jul 3 17:40:49 2005 for XML-Security-C by  doxygen 1.4.2