PKIFXSECCryptoKeyDSA Class Reference

#include <PKIFXSECCryptoKeyDSA.h>

Inheritance diagram for PKIFXSECCryptoKeyDSA:

Inheritance graph
[legend]
Collaboration diagram for PKIFXSECCryptoKeyDSA:

Collaboration graph
[legend]

List of all members.


Detailed Description

Interface class for DSA keys.

The XML security library uses instances of this class to process DSA keys and signatures.

TSP-enforcing: No

Definition at line 27 of file PKIFXSECCryptoKeyDSA.h.


Public Member Functions

 PKIFXSECCryptoKeyDSA ()
virtual ~PKIFXSECCryptoKeyDSA ()
virtual XSECCryptoKey * clone () const
virtual bool verifyBase64Signature (unsigned char *hashBuf, unsigned int hashLen, char *base64Signature, unsigned int sigLen)
virtual unsigned int signBase64Signature (unsigned char *hashBuf, unsigned int hashLen, char *base64SignatureBuf, unsigned int base64SignatureBufLen)
virtual void SetMediator (IPKIFMediatorPtr &med)
virtual void SetCredential (CPKIFCredentialPtr &cred)
virtual void SetKeyMaterial (CPKIFKeyMaterialPtr &km)
virtual XSECCryptoKey::KeyType getKeyType () const
virtual const XMLCh * getProviderName () const
virtual void loadPBase64BigNums (const char *b64, unsigned int len)
virtual void loadQBase64BigNums (const char *b64, unsigned int len)
virtual void loadGBase64BigNums (const char *b64, unsigned int len)
virtual void loadYBase64BigNums (const char *b64, unsigned int len)
virtual void loadJBase64BigNums (const char *b64, unsigned int len)

Protected Attributes

PKIFXSECCryptoKeyDSAImpl * m_impl

Constructor & Destructor Documentation

PKIFXSECCryptoKeyDSA::PKIFXSECCryptoKeyDSA (  ) 

Interface: External

Default Constructor: prepare an empty PKIFXSECCryptoKeyDSA object. SetMediator() must be called before this class can be used for any operations.

Returns:
None

Definition at line 34 of file PKIFXSECCryptoKeyDSA.cpp.

Referenced by clone().

PKIFXSECCryptoKeyDSA::~PKIFXSECCryptoKeyDSA (  )  [virtual]

Interface: External

Frees resources used by a PKIFXSECCryptoKeyDSA object.

Returns:
None

Definition at line 46 of file PKIFXSECCryptoKeyDSA.cpp.

References m_impl.


Member Function Documentation

XSECCryptoKey * PKIFXSECCryptoKeyDSA::clone (  )  const [virtual]

Interface: External

Used by the apache xml security library to copy this object

Returns:
a copy of this object

Definition at line 61 of file PKIFXSECCryptoKeyDSA.cpp.

References m_impl, and PKIFXSECCryptoKeyDSA().

bool PKIFXSECCryptoKeyDSA::verifyBase64Signature ( unsigned char *  hashBuf,
unsigned int  hashLen,
char *  base64Signature,
unsigned int  sigLen 
) [virtual]

Interface: External

Verify a signature

The apache xml security library will call this function to validate a signature

Returns:
true if the signature was valid, false otherwise
Parameters:
hashBuf  [in] Buffer containing the pre-calculated (binary) digest
hashLen  [in] Length of the data in the digest buffer
base64Signature  [in] Buffer containing the Base64 encoded signature
sigLen  [in] Length of the data in the signature buffer

Definition at line 79 of file PKIFXSECCryptoKeyDSA.cpp.

References CPKIFException::GetDescription(), m_impl, PKIFCRYPTO::SHA1, and IPKIFCryptoRawOperations::Verify().

unsigned int PKIFXSECCryptoKeyDSA::signBase64Signature ( unsigned char *  hashBuf,
unsigned int  hashLen,
char *  base64SignatureBuf,
unsigned int  base64SignatureBufLen 
) [virtual]

Interface: External Create a signature

The apache xml security library will call this function to create a signature from a pre-calculated digest. The output signature is required to be Base64 encoded such that it can be placed directly into the XML document

Returns:
number of bytes written to the output buffer
Parameters:
hashBuf  [in] Buffer containing the pre-calculated (binary) digest
hashLen  [in] Number of bytes of hash in the hashBuf
base64SignatureBuf  [out] Buffer to place the base64 encoded result
base64SignatureBufLen  [out] Size of the output buffer in bytes

Definition at line 125 of file PKIFXSECCryptoKeyDSA.cpp.

References CPKIFException::GetDescription(), m_impl, PKIFCRYPTO::SHA1, and IPKIFCryptoKeyIDOperations::Sign().

void PKIFXSECCryptoKeyDSA::SetMediator ( IPKIFMediatorPtr med  )  [virtual]

Interface: External

Set the mediator this object will use to find crypto colleagues

Returns:
none
Parameters:
med  [in] Pointer to a mediator object to be used

Definition at line 171 of file PKIFXSECCryptoKeyDSA.cpp.

References m_impl.

Referenced by PKIFXSECCryptoX509::clonePublicKey(), PKIFXSECCrypto::keyDSA(), and PKIFXSECKeyInfoResolver::resolveKey().

void PKIFXSECCryptoKeyDSA::SetCredential ( CPKIFCredentialPtr &  cred  )  [virtual]

Interface: External

Set the credential this object will use to generate signatures

Returns:
none
Parameters:
cred  [in] signing credential

Definition at line 185 of file PKIFXSECCryptoKeyDSA.cpp.

References m_impl.

void PKIFXSECCryptoKeyDSA::SetKeyMaterial ( CPKIFKeyMaterialPtr &  km  )  [virtual]

Interface: External

Set the key material this object will use to verify signatures

Returns:
none
Parameters:
km  [in] key material to use for verification

Definition at line 199 of file PKIFXSECCryptoKeyDSA.cpp.

References m_impl.

Referenced by PKIFXSECCryptoX509::clonePublicKey(), and PKIFXSECKeyInfoResolver::resolveKey().

XSECCryptoKey::KeyType PKIFXSECCryptoKeyDSA::getKeyType (  )  const [virtual]

Interface: External

Determine whether the object has private key material

Returns:
None

Definition at line 225 of file PKIFXSECCryptoKeyDSA.cpp.

References m_impl.

const XMLCh * PKIFXSECCryptoKeyDSA::getProviderName (  )  const [virtual]

Interface: External

Get the name of the provider

Returns:
Name of the PKIF XML provider

Definition at line 213 of file PKIFXSECCryptoKeyDSA.cpp.

References pkifProvName().

virtual void PKIFXSECCryptoKeyDSA::loadPBase64BigNums ( const char *  b64,
unsigned int  len 
) [inline, virtual]

Interface: Module

Not supported by PKIF

Returns:
None

Definition at line 63 of file PKIFXSECCryptoKeyDSA.h.

virtual void PKIFXSECCryptoKeyDSA::loadQBase64BigNums ( const char *  b64,
unsigned int  len 
) [inline, virtual]

Interface: Module

Not supported by PKIF

Returns:
None

Definition at line 71 of file PKIFXSECCryptoKeyDSA.h.

virtual void PKIFXSECCryptoKeyDSA::loadGBase64BigNums ( const char *  b64,
unsigned int  len 
) [inline, virtual]

Interface: Module

Not supported by PKIF

Returns:
None

Definition at line 79 of file PKIFXSECCryptoKeyDSA.h.

virtual void PKIFXSECCryptoKeyDSA::loadYBase64BigNums ( const char *  b64,
unsigned int  len 
) [inline, virtual]

Interface: Module

Not supported by PKIF

Returns:
None

Definition at line 87 of file PKIFXSECCryptoKeyDSA.h.

virtual void PKIFXSECCryptoKeyDSA::loadJBase64BigNums ( const char *  b64,
unsigned int  len 
) [inline, virtual]

Interface: Module

Not supported by PKIF

Returns:
None

Definition at line 95 of file PKIFXSECCryptoKeyDSA.h.


Member Data Documentation

PKIFXSECCryptoKeyDSAImpl* PKIFXSECCryptoKeyDSA::m_impl [protected]


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

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