#include <PKIFXSECCryptoKeyDSA.h>
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 |
PKIFXSECCryptoKeyDSA::PKIFXSECCryptoKeyDSA | ( | ) |
Interface: External
Default Constructor: prepare an empty PKIFXSECCryptoKeyDSA object. SetMediator() must be called before this class can be used for any operations.
Definition at line 34 of file PKIFXSECCryptoKeyDSA.cpp.
Referenced by clone().
PKIFXSECCryptoKeyDSA::~PKIFXSECCryptoKeyDSA | ( | ) | [virtual] |
Interface: External
Frees resources used by a PKIFXSECCryptoKeyDSA object.
Definition at line 46 of file PKIFXSECCryptoKeyDSA.cpp.
References m_impl.
XSECCryptoKey * PKIFXSECCryptoKeyDSA::clone | ( | ) | const [virtual] |
Interface: External
Used by the apache xml security library to copy 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
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
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
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
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
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
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
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
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
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
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
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
Definition at line 95 of file PKIFXSECCryptoKeyDSA.h.
PKIFXSECCryptoKeyDSAImpl* PKIFXSECCryptoKeyDSA::m_impl [protected] |
Definition at line 53 of file PKIFXSECCryptoKeyDSA.h.
Referenced by clone(), getKeyType(), SetCredential(), SetKeyMaterial(), SetMediator(), signBase64Signature(), verifyBase64Signature(), and ~PKIFXSECCryptoKeyDSA().