Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

WinCAPICryptoKeyDSA Class Reference

#include <WinCAPICryptoKeyDSA.hpp>

Inheritance diagram for WinCAPICryptoKeyDSA:

Inheritance graph
[legend]
Collaboration diagram for WinCAPICryptoKeyDSA:

Collaboration graph
[legend]
List of all members.

Public Methods

 WinCAPICryptoKeyDSA (WinCAPICryptoProvider *owner)
virtual ~WinCAPICryptoKeyDSA ()
 WinCAPICryptoKeyDSA (WinCAPICryptoProvider *owner, HCRYPTKEY k, bool havePrivate=false)
 Dedicated WinCAPI constructor.

virtual XSECCryptoKey::KeyType getKeyType ()
 Return the type of this key.

virtual const XMLCh * getProviderName ()
 Returns a string that identifies the crypto owner of this library.

virtual XSECCryptoKeyclone ()
 Replicate key.

virtual void loadPBase64BigNums (const char *b64, unsigned int len)
 Load P.

virtual void loadQBase64BigNums (const char *b64, unsigned int len)
 Load Q.

virtual void loadGBase64BigNums (const char *b64, unsigned int len)
 Load G.

virtual void loadYBase64BigNums (const char *b64, unsigned int len)
 Load Y.

virtual void loadJBase64BigNums (const char *b64, unsigned int len)
 Load J.

virtual bool verifyBase64Signature (unsigned char *hashBuf, unsigned int hashLen, char *base64Signature, unsigned int sigLen)
 Verify a signature.

virtual unsigned int signBase64Signature (unsigned char *hashBuf, unsigned int hashLen, char *base64SignatureBuf, unsigned int base64SignatureBufLen)
 Create a signature.

unsigned int getPBase64BigNums (char *b64, unsigned int len)
unsigned int getQBase64BigNums (char *b64, unsigned int len)
unsigned int getGBase64BigNums (char *b64, unsigned int len)
unsigned int getYBase64BigNums (char *b64, unsigned int len)

Constructor & Destructor Documentation

WinCAPICryptoKeyDSA::WinCAPICryptoKeyDSA WinCAPICryptoProvider   owner
 

virtual WinCAPICryptoKeyDSA::~WinCAPICryptoKeyDSA   [virtual]
 

WinCAPICryptoKeyDSA::WinCAPICryptoKeyDSA WinCAPICryptoProvider   owner,
HCRYPTKEY    k,
bool    havePrivate = false
 

Dedicated WinCAPI constructor.

Create a DSA key for use in XSEC from an existing HCRYPTKEY

Parameters:
owner  The owner provider object (needed to find CSP)
k  The key to use
havePrivate  The CSP holds the private key as well as public
Note:
k is owned by the library. When the wrapper WinCAPICryptoKeyDSA is deleted, k will be destroyed using CryptDestroyKey()


Member Function Documentation

virtual XSECCryptoKey* WinCAPICryptoKeyDSA::clone   [virtual]
 

Replicate key.

Implements XSECCryptoKeyDSA.

unsigned int WinCAPICryptoKeyDSA::getGBase64BigNums char *    b64,
unsigned int    len
 

virtual XSECCryptoKey::KeyType WinCAPICryptoKeyDSA::getKeyType   [virtual]
 

Return the type of this key.

For DSA keys, this allows people to determine whether this is a public key, private key or a key pair

Reimplemented from XSECCryptoKeyDSA.

unsigned int WinCAPICryptoKeyDSA::getPBase64BigNums char *    b64,
unsigned int    len
 

virtual const XMLCh* WinCAPICryptoKeyDSA::getProviderName   [inline, virtual]
 

Returns a string that identifies the crypto owner of this library.

Implements XSECCryptoKey.

unsigned int WinCAPICryptoKeyDSA::getQBase64BigNums char *    b64,
unsigned int    len
 

unsigned int WinCAPICryptoKeyDSA::getYBase64BigNums char *    b64,
unsigned int    len
 

virtual void WinCAPICryptoKeyDSA::loadGBase64BigNums const char *    b64,
unsigned int    len
[virtual]
 

Load G.

Parameters:
b64  Base64 encoded parameter - read from XML document
len  Length of the encoded string

Implements XSECCryptoKeyDSA.

virtual void WinCAPICryptoKeyDSA::loadJBase64BigNums const char *    b64,
unsigned int    len
[virtual]
 

Load J.

Parameters:
b64  Base64 encoded parameter - read from XML document
len  Length of the encoded string

Implements XSECCryptoKeyDSA.

virtual void WinCAPICryptoKeyDSA::loadPBase64BigNums const char *    b64,
unsigned int    len
[virtual]
 

Load P.

Parameters:
b64  Base64 encoded parameter - read from XML document
len  Length of the encoded string

Implements XSECCryptoKeyDSA.

virtual void WinCAPICryptoKeyDSA::loadQBase64BigNums const char *    b64,
unsigned int    len
[virtual]
 

Load Q.

Parameters:
b64  Base64 encoded parameter - read from XML document
len  Length of the encoded string

Implements XSECCryptoKeyDSA.

virtual void WinCAPICryptoKeyDSA::loadYBase64BigNums const char *    b64,
unsigned int    len
[virtual]
 

Load Y.

Parameters:
b64  Base64 encoded parameter - read from XML document
len  Length of the encoded string

Implements XSECCryptoKeyDSA.

virtual unsigned int WinCAPICryptoKeyDSA::signBase64Signature unsigned char *    hashBuf,
unsigned int    hashLen,
char *    base64SignatureBuf,
unsigned int    base64SignatureBufLen
[virtual]
 

Create a signature.

The 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

Parameters:
hashBuf  Buffer containing the pre-calculated (binary) digest
hashLen  Number of bytes of hash in the hashBuf
base64SignatureBuf  Buffer to place the base64 encoded result in.
base64SignatureBufLen  Implementations need to ensure they do not write more bytes than this into the buffer

Implements XSECCryptoKeyDSA.

virtual bool WinCAPICryptoKeyDSA::verifyBase64Signature unsigned char *    hashBuf,
unsigned int    hashLen,
char *    base64Signature,
unsigned int    sigLen
[virtual]
 

Verify a signature.

The library will call this function to validate a signature

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

Implements XSECCryptoKeyDSA.


The documentation for this class was generated from the following file:
Generated on Wed May 7 21:44:12 2003 for XML-Security-C by doxygen1.2.18