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

DSIGKeyInfoValue Class Reference
[Main Signature API]

#include <DSIGKeyInfoValue.hpp>

Inheritance diagram for DSIGKeyInfoValue:

Inheritance graph
[legend]
Collaboration diagram for DSIGKeyInfoValue:

Collaboration graph
[legend]
List of all members.

Detailed Description

The class for <KeyValue> nodes in a KeyInfo list.

Class for holding information on a KeyValue node as well as setting such a node in a signature.

Two types of Value are understood - RSA and DSA.

RSA values are fully implemented as per XML-DSig. They have two parameters

DSA values have all mandatory parts implemented - P, Q, G and Y.

J, Seed and PgenCounter are not currently implemented.


Public Member Functions

Constructors and Destructors
 DSIGKeyInfoValue (const XSECEnv *env, XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *valueNode)
 Constructor for an existing KeyInfo *.
 DSIGKeyInfoValue (const XSECEnv *env)
 Constructor for creating from scratch.
virtual ~DSIGKeyInfoValue ()
Loading and Get functions
virtual void load (void)
 Load an existing XML structure.
const XMLCh * getDSAP (void)
 Get P value.
const XMLCh * getDSAQ (void)
 Get Q value.
const XMLCh * getDSAG (void)
 Get G value.
const XMLCh * getDSAY (void)
 Get Y value.
const XMLCh * getRSAModulus (void)
 Get Modulus.
const XMLCh * getRSAExponent (void)
 Get Exponent.
DSA Create and set functions
XERCES_CPP_NAMESPACE_QUALIFIER
DOMElement * 
createBlankDSAKeyValue (const XMLCh *P, const XMLCh *Q, const XMLCh *G, const XMLCh *Y)
 Create a blank KeyValue (and DOM structure).
void setDSAP (const XMLCh *P)
 Set P value.
void setDSAQ (const XMLCh *Q)
 Set Q value.
void setDSAG (const XMLCh *G)
 Set G value.
void setDSAY (const XMLCh *Y)
 Set Y value.
RSA Create and Set functions
XERCES_CPP_NAMESPACE_QUALIFIER
DOMElement * 
createBlankRSAKeyValue (const XMLCh *modulus, const XMLCh *exponent)
 Create a blank RSA KeyValue.
void setRSAModulus (const XMLCh *modulus)
 Set the Modulus.
void setRSAExponent (const XMLCh *exponent)
 Set the exponent.
Information Functions
virtual keyInfoType getKeyInfoType (void)
 Interface call to return type.
virtual const XMLCh * getKeyName (void)
 Get the name of this key (irrelevant for a KeyValue).


Constructor & Destructor Documentation

DSIGKeyInfoValue::DSIGKeyInfoValue const XSECEnv env,
XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *  valueNode
 

Constructor for an existing KeyInfo *.

Constructor used when loading a KeyValue node that already exists in an XML document.

Parameters:
env Operating environment
valueNode DOMNode at head of XML structure

DSIGKeyInfoValue::DSIGKeyInfoValue const XSECEnv env  ) 
 

Constructor for creating from scratch.

Constructor used when creating a new KeyValue node to append to a signature structure.

Parameters:
env Operating environment

virtual DSIGKeyInfoValue::~DSIGKeyInfoValue  )  [virtual]
 


Member Function Documentation

XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* DSIGKeyInfoValue::createBlankDSAKeyValue const XMLCh *  P,
const XMLCh *  Q,
const XMLCh *  G,
const XMLCh *  Y
 

Create a blank KeyValue (and DOM structure).

Create a blank KeyValue structure with the passed parameters and create the required DOM structure as well.

Parameters:
P The P value (base64 encoded in unicode format)
Q The Q value (base64 encoded in unicode format)
G The G value (base64 encoded in unicode format)
Y The Y value (base64 encoded in unicode format)
Returns:
the DOMElement at the head of the DOM structure

XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* DSIGKeyInfoValue::createBlankRSAKeyValue const XMLCh *  modulus,
const XMLCh *  exponent
 

Create a blank RSA KeyValue.

Create a new RSA Value object and associated DOM structures.

Parameters:
modulus Base64 encoded value of Modulus to set
exponent Base64 encoded value of the Exponent to set
Returns:
The DOM structure of the RSAValue that has been created

const XMLCh* DSIGKeyInfoValue::getDSAG void   )  [inline]
 

Get G value.

Returns:
a pointer to the DSA G string value.

const XMLCh* DSIGKeyInfoValue::getDSAP void   )  [inline]
 

Get P value.

Returns:
a pointer to the DSA P string value.

const XMLCh* DSIGKeyInfoValue::getDSAQ void   )  [inline]
 

Get Q value.

Returns:
a pointer to the DSA Q string value.

const XMLCh* DSIGKeyInfoValue::getDSAY void   )  [inline]
 

Get Y value.

Returns:
a pointer to the DSA Y string value.

virtual keyInfoType DSIGKeyInfoValue::getKeyInfoType void   )  [virtual]
 

Interface call to return type.

Returns:
the type of this keyInfo node

Implements DSIGKeyInfo.

virtual const XMLCh* DSIGKeyInfoValue::getKeyName void   )  [virtual]
 

Get the name of this key (irrelevant for a KeyValue).

Returns:
NULL

Implements DSIGKeyInfo.

const XMLCh* DSIGKeyInfoValue::getRSAExponent void   ) 
 

Get Exponent.

Returns:
A pointer to the buffer containing the RSA Modulus string

const XMLCh* DSIGKeyInfoValue::getRSAModulus void   ) 
 

Get Modulus.

Returns:
A pointer to the RSA Modulus

virtual void DSIGKeyInfoValue::load void   )  [virtual]
 

Load an existing XML structure.

Called by the Signature class when it is reading in a DOM structure

Implements DSIGKeyInfo.

void DSIGKeyInfoValue::setDSAG const XMLCh *  G  ) 
 

Set G value.

Take the provided string and use it to set the G parameter in the KeyValue

void DSIGKeyInfoValue::setDSAP const XMLCh *  P  ) 
 

Set P value.

Take the provided string and use it to set the P parameter in the KeyValue

void DSIGKeyInfoValue::setDSAQ const XMLCh *  Q  ) 
 

Set Q value.

Take the provided string and use it to set the Q parameter in the KeyValue

void DSIGKeyInfoValue::setDSAY const XMLCh *  Y  ) 
 

Set Y value.

Take the provided string and use it to set the Y parameter in the KeyValue

void DSIGKeyInfoValue::setRSAExponent const XMLCh *  exponent  ) 
 

Set the exponent.

Set the base64 encoded string of the exponent value within the element

Parameters:
exponent Base64 encoded value to set

void DSIGKeyInfoValue::setRSAModulus const XMLCh *  modulus  ) 
 

Set the Modulus.

Set the base64 encoded string of the Modulus value within the element.

Parameters:
modulus Base64 encoded value to set


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