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

WinCAPICryptoProvider Class Reference

#include <WinCAPICryptoProvider.hpp>

Inheritance diagram for WinCAPICryptoProvider:

Inheritance graph
[legend]
Collaboration diagram for WinCAPICryptoProvider:

Collaboration graph
[legend]
List of all members.

Public Methods

 WinCAPICryptoProvider (HCRYPTPROV provDSS, HCRYPTPROV provRSA)
 Create a Windows CAPI interface layer.

 WinCAPICryptoProvider ()
 Create a Windows CAPI interface layer.

virtual ~WinCAPICryptoProvider ()
virtual XSECCryptoHashhashSHA1 ()
 Return a SHA1 implementation.

virtual XSECCryptoHashhashHMACSHA1 ()
 Return a HMAC SHA1 implementation.

virtual XSECCryptoHashhashMD5 ()
 Return a MD5 implementation.

virtual XSECCryptoHashhashHMACMD5 ()
 Return a HMAC MD5 implementation.

virtual XSECCryptoBase64base64 ()
 Return a Base64 encoder/decoder implementation.

virtual XSECCryptoKeyDSAkeyDSA ()
 Return a DSA key implementation object.

virtual XSECCryptoKeyRSAkeyRSA ()
 Return an RSA key implementation object.

virtual XSECCryptoX509X509 ()
 Return an X509 implementation object.

HCRYPTPROV getProviderDSS (void)
HCRYPTPROV getProviderRSA (void)

Static Public Methods

BYTE * b642WinBN (const char *b64, unsigned int b64Len, unsigned int &retLen)
 Translate B64 I2OS integer to a WinCAPI int.

unsigned char * WinBN2b64 (BYTE *n, DWORD nLen, unsigned int &retLen)
 Translate a WinCAPI int to a B64 I2OS integer .


Constructor & Destructor Documentation

WinCAPICryptoProvider::WinCAPICryptoProvider HCRYPTPROV    provDSS,
HCRYPTPROV    provRSA
 

Create a Windows CAPI interface layer.

Windows CSPs work under a provider model. The user should specify which CSP to use and which key container to use.

Parameters:
provDSS  DSS provider - must be of type PROV_DSS
provRSA  RSA provider - must be of type PROV_RSA_FULL

WinCAPICryptoProvider::WinCAPICryptoProvider  
 

Create a Windows CAPI interface layer.

The default constructor will use the default providers and containers

Note:
This call will fail if the user has not generated keys in the default DSS and RSA provider containers

virtual WinCAPICryptoProvider::~WinCAPICryptoProvider   [virtual]
 


Member Function Documentation

BYTE* WinCAPICryptoProvider::b642WinBN const char *    b64,
unsigned int    b64Len,
unsigned int &    retLen
[static]
 

Translate B64 I2OS integer to a WinCAPI int.

Decodes a Base64 integer and reverses the order to allow loading into a Windows CAPI function. (CAPI uses Little Endian storage of integers).

Parameters:
b64  Base 64 string
b64Len  Length of base64 string
retLen  Parameter to hold length of return integer

virtual XSECCryptoBase64* WinCAPICryptoProvider::base64   [virtual]
 

Return a Base64 encoder/decoder implementation.

Call used by the library to obtain a Base64 encoder/decoder.

Returns:
Pointer to the new Base64 encoder.
See also:
XSECCryptoBase64

Implements XSECCryptoProvider.

HCRYPTPROV WinCAPICryptoProvider::getProviderDSS void    [inline]
 

HCRYPTPROV WinCAPICryptoProvider::getProviderRSA void    [inline]
 

virtual XSECCryptoHash* WinCAPICryptoProvider::hashHMACMD5   [virtual]
 

Return a HMAC MD5 implementation.

Call used by the library to obtain a HMAC MD5 object from the provider. The caller will need to set the key in the hash object with an XSECCryptoKeyHMAC using XSECCryptoHash::setKey()

Note:
The use of MD5 is explicitly marked as not recommended in the XML Digital Signature standard due to recent advances in cryptography indicating there may be weaknesses in the algorithm.
Returns:
A pointer to a Hash object that implements HMAC-MD5
See also:
XSECCryptoHash

Implements XSECCryptoProvider.

virtual XSECCryptoHash* WinCAPICryptoProvider::hashHMACSHA1   [virtual]
 

Return a HMAC SHA1 implementation.

Call used by the library to obtain a HMAC SHA1 object from the provider. The caller will need to set the key in the hash object with an XSECCryptoKeyHMAC using XSECCryptoHash::setKey()

Returns:
A pointer to a Hash object that implements HMAC-SHA1
See also:
XSECCryptoHash

Implements XSECCryptoProvider.

virtual XSECCryptoHash* WinCAPICryptoProvider::hashMD5   [virtual]
 

Return a MD5 implementation.

Call used by the library to obtain a MD5 object from the provider.

Returns:
A pointer to a Hash object that implements MD5
See also:
XSECCryptoHash

Implements XSECCryptoProvider.

virtual XSECCryptoHash* WinCAPICryptoProvider::hashSHA1   [virtual]
 

Return a SHA1 implementation.

Call used by the library to obtain a SHA1 object from the provider.

Returns:
A pointer to a Hash object that implements SHA1
See also:
XSECCryptoHash

Implements XSECCryptoProvider.

virtual XSECCryptoKeyDSA* WinCAPICryptoProvider::keyDSA   [virtual]
 

Return a DSA key implementation object.

Call used by the library to obtain a DSA key object.

Returns:
Pointer to the new DSA key
See also:
XSECCryptoKeyDSA

Implements XSECCryptoProvider.

virtual XSECCryptoKeyRSA* WinCAPICryptoProvider::keyRSA   [virtual]
 

Return an RSA key implementation object.

Call used by the library to obtain an RSA key object.

Returns:
Pointer to the new RSA key
See also:
XSECCryptoKeyRSA

Implements XSECCryptoProvider.

unsigned char* WinCAPICryptoProvider::WinBN2b64 BYTE *    n,
DWORD    nLen,
unsigned int &    retLen
[static]
 

Translate a WinCAPI int to a B64 I2OS integer .

Encodes a Windows integer in I2OSP base64 encoded format.

Parameters:
b64  Base 64 buffer
b64Len  Length of base64 buffer
retLen  Parameter to hold length of return integer

virtual XSECCryptoX509* WinCAPICryptoProvider::X509   [virtual]
 

Return an X509 implementation object.

Call used by the library to obtain an object that can work with X509 certificates.

Returns:
Pointer to the new X509 object
See also:
XSECCryptoX509

Implements XSECCryptoProvider.


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