Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

XSECCryptoProvider Class Reference

#include <XSECCryptoProvider.hpp>

Inheritance diagram for XSECCryptoProvider:

Inheritance graph
[legend]
List of all members.

Detailed Description

The base class that all *CryptoProviders need to implement.

The instatiations of this class are used by the core library to create cryptographic objects necessary for the library to do its work without actually knowing any details at all about the provider library

Note:
Subject to change
See also:
OpenSSLCryptoProvider


Public Member Functions

Constructors and Destructors
 XSECCryptoProvider ()
virtual ~XSECCryptoProvider ()
Hashing (Digest) Functions
virtual XSECCryptoHashhashSHA1 ()=0
 Return a SHA1 implementation.
virtual XSECCryptoHashhashSHA (int length=160)=0
 Return a SHA implementation.
virtual XSECCryptoHashhashHMACSHA1 ()=0
 Return a HMAC SHA1 implementation.
virtual XSECCryptoHashhashHMACSHA (int length=160)=0
 Return a HMAC SHA(1-512) implementation.
virtual XSECCryptoHashhashMD5 ()=0
 Return a MD5 implementation.
virtual XSECCryptoHashhashHMACMD5 ()=0
 Return a HMAC MD5 implementation.
virtual XSECCryptoKeyHMACkeyHMAC (void)=0
 Return a HMAC key.
Encoding functions
virtual XSECCryptoBase64base64 ()=0
 Return a Base64 encoder/decoder implementation.
Keys and Certificates
virtual XSECCryptoKeyDSAkeyDSA ()=0
 Return a DSA key implementation object.
virtual XSECCryptoKeyRSAkeyRSA ()=0
 Return an RSA key implementation object.
virtual XSECCryptoX509X509 ()=0
 Return an X509 implementation object.
virtual bool algorithmSupported (XSECCryptoSymmetricKey::SymmetricKeyType alg)=0
 Determine whether a given algorithm is supported.
virtual bool algorithmSupported (XSECCryptoHash::HashType alg)=0
 Determine whether a given algorithm is supported.
virtual XSECCryptoSymmetricKeykeySymmetric (XSECCryptoSymmetricKey::SymmetricKeyType alg)=0
 Return a Symmetric Key implementation object.
virtual unsigned int getRandom (unsigned char *buffer, unsigned int numOctets)=0
 Obtain some random octets.
Information Functions
virtual const XMLCh * getProviderName ()=0
 Returns a string that identifies the Crypto Provider.


Constructor & Destructor Documentation

XSECCryptoProvider::XSECCryptoProvider  )  [inline]
 

virtual XSECCryptoProvider::~XSECCryptoProvider  )  [inline, virtual]
 


Member Function Documentation

virtual bool XSECCryptoProvider::algorithmSupported XSECCryptoHash::HashType  alg  )  [pure virtual]
 

Determine whether a given algorithm is supported.

A call that can be used to determine whether a given digest algorithm is supported

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual bool XSECCryptoProvider::algorithmSupported XSECCryptoSymmetricKey::SymmetricKeyType  alg  )  [pure virtual]
 

Determine whether a given algorithm is supported.

A call that can be used to determine whether a given symmetric algorithm is supported

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual XSECCryptoBase64* XSECCryptoProvider::base64  )  [pure 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

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual const XMLCh* XSECCryptoProvider::getProviderName  )  [pure virtual]
 

Returns a string that identifies the Crypto Provider.

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual unsigned int XSECCryptoProvider::getRandom unsigned char *  buffer,
unsigned int  numOctets
[pure virtual]
 

Obtain some random octets.

For generation of IVs and the like, the library needs to be able to obtain "random" octets. The library uses this call to the crypto provider to obtain what it needs.

Parameters:
buffer The buffer to place the random data in
numOctets Number of bytes required
Returns:
Number of bytes obtained.

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual XSECCryptoHash* XSECCryptoProvider::hashHMACMD5  )  [pure 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

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual XSECCryptoHash* XSECCryptoProvider::hashHMACSHA int  length = 160  )  [pure virtual]
 

Return a HMAC SHA(1-512) implementation.

Call used by the library to obtain a HMAC SHA 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
Parameters:
length Length of hash output (160 = SHA1, 256, 512 etc)
See also:
XSECCryptoHash

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual XSECCryptoHash* XSECCryptoProvider::hashHMACSHA1  )  [pure 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
Deprecated:
use hashHMACSHA instead

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual XSECCryptoHash* XSECCryptoProvider::hashMD5  )  [pure 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

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual XSECCryptoHash* XSECCryptoProvider::hashSHA int  length = 160  )  [pure virtual]
 

Return a SHA implementation.

Call used by the library to obtain a SHA object from the provider. Size of hash determined by length argument (160 = SHA1)

Returns:
A pointer to a Hash object that implements SHA1
Parameters:
length - length of hash. E.g. 160 for SHA1 or 256 for SHA256
See also:
XSECCryptoHash

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual XSECCryptoHash* XSECCryptoProvider::hashSHA1  )  [pure 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
Deprecated:
Use hashSHA instead

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual XSECCryptoKeyDSA* XSECCryptoProvider::keyDSA  )  [pure 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

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual XSECCryptoKeyHMAC* XSECCryptoProvider::keyHMAC void   )  [pure virtual]
 

Return a HMAC key.

Sometimes the library needs to create an HMAC key (notably within the XKMS utilities.

This function allows the library to obtain a key that can then have a value set within it.

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual XSECCryptoKeyRSA* XSECCryptoProvider::keyRSA  )  [pure 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

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual XSECCryptoSymmetricKey* XSECCryptoProvider::keySymmetric XSECCryptoSymmetricKey::SymmetricKeyType  alg  )  [pure virtual]
 

Return a Symmetric Key implementation object.

Call used by the library to obtain a bulk encryption object.

Returns:
Pointer to the new SymmetricKey object
See also:
XSECCryptoSymmetricKey

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.

virtual XSECCryptoX509* XSECCryptoProvider::X509  )  [pure 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

Implemented in OpenSSLCryptoProvider, and WinCAPICryptoProvider.


The documentation for this class was generated from the following file:
Generated on Sun Jul 3 17:45:33 2005 for XML-Security-C by  doxygen 1.4.2