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

XSECCryptoKeyDSA Class Reference
[Cryptographic Abstraction Layer]

Interface class for DSA keys. More...

#include <XSECCryptoKeyDSA.hpp>

Inheritance diagram for XSECCryptoKeyDSA:

Inheritance graph
[legend]
Collaboration diagram for XSECCryptoKeyDSA:

Collaboration graph
[legend]
List of all members.

Public Methods

Constructors and Destructors
 XSECCryptoKeyDSA ()
virtual ~XSECCryptoKeyDSA ()
Key Interface methods
virtual XSECCryptoKey::KeyType getKeyType ()
 Return the type of this key. More...

virtual XSECCryptoKeyclone ()=0
 Replicate key. More...

Mandatory DSA interface methods
These classes are required by the library.

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

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

Optional Interface methods
These functions do not necessarily have to be implmented. They are used by XSECKeyInfoResolverDefault to try to create a key from KeyInfo elements without knowing anything else.

If an interface class does not implement these functions, a simple stub that does nothing should be used.

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

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

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

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

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


Detailed Description

Interface class for DSA keys.

The library uses classes derived from this to process DSA keys.


Constructor & Destructor Documentation

XSECCryptoKeyDSA::XSECCryptoKeyDSA   [inline]
 

virtual XSECCryptoKeyDSA::~XSECCryptoKeyDSA   [inline, virtual]
 


Member Function Documentation

virtual XSECCryptoKey* XSECCryptoKeyDSA::clone   [pure virtual]
 

Replicate key.

Implements XSECCryptoKey.

Implemented in OpenSSLCryptoKeyDSA.

virtual XSECCryptoKey::KeyType XSECCryptoKeyDSA::getKeyType   [inline, 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 XSECCryptoKey.

Reimplemented in OpenSSLCryptoKeyDSA.

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

Load G.

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

Implemented in OpenSSLCryptoKeyDSA.

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

Load J.

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

Implemented in OpenSSLCryptoKeyDSA.

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

Load P.

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

Implemented in OpenSSLCryptoKeyDSA.

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

Load Q.

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

Implemented in OpenSSLCryptoKeyDSA.

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

Load Y.

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

Implemented in OpenSSLCryptoKeyDSA.

virtual unsigned int XSECCryptoKeyDSA::signBase64Signature unsigned char *    hashBuf,
unsigned int    hashLen,
char *    base64SignatureBuf,
unsigned int    base64SignatureBufLen
[pure 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

Implemented in OpenSSLCryptoKeyDSA.

virtual bool XSECCryptoKeyDSA::verifyBase64Signature unsigned char *    hashBuf,
unsigned int    hashLen,
char *    base64Signature,
unsigned int    sigLen
[pure 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

Implemented in OpenSSLCryptoKeyDSA.


The documentation for this class was generated from the following file:
Generated on Wed Mar 26 20:12:21 2003 for XML-Security-C by doxygen1.2.15