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

OpenSSLCryptoProvider Class Reference

#include <OpenSSLCryptoProvider.hpp>

Inheritance diagram for OpenSSLCryptoProvider:

Inheritance graph
[legend]
Collaboration diagram for OpenSSLCryptoProvider:

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

Constructor & Destructor Documentation

OpenSSLCryptoProvider::OpenSSLCryptoProvider  ) 
 

virtual OpenSSLCryptoProvider::~OpenSSLCryptoProvider  )  [virtual]
 


Member Function Documentation

virtual bool OpenSSLCryptoProvider::algorithmSupported XSECCryptoHash::HashType  alg  )  [virtual]
 

Determine whether a given algorithm is supported.

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

Implements XSECCryptoProvider.

virtual bool OpenSSLCryptoProvider::algorithmSupported XSECCryptoSymmetricKey::SymmetricKeyType  alg  )  [virtual]
 

Determine whether a given algorithm is supported.

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

Implements XSECCryptoProvider.

virtual XSECCryptoBase64* OpenSSLCryptoProvider::base64  )  [virtual]
 

Return a Base64 encoder/decoder implementation.

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

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

Implements XSECCryptoProvider.

virtual const XMLCh* OpenSSLCryptoProvider::getProviderName  )  [virtual]
 

Returns a string that identifies the Crypto Provider.

Implements XSECCryptoProvider.

virtual unsigned int OpenSSLCryptoProvider::getRandom unsigned char *  buffer,
unsigned int  numOctets
[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.

Implements XSECCryptoProvider.

virtual XSECCryptoHash* OpenSSLCryptoProvider::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:
OpenSSLCryptoHash

Implements XSECCryptoProvider.

virtual XSECCryptoHash* OpenSSLCryptoProvider::hashHMACSHA int  length = 160  )  [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:
OpenSSLCryptoHash

Implements XSECCryptoProvider.

virtual XSECCryptoHash* OpenSSLCryptoProvider::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 OpenSSLCryptoHash::setKey()

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

Implements XSECCryptoProvider.

virtual XSECCryptoHash* OpenSSLCryptoProvider::hashMD5  )  [virtual]
 

Return a MD5 implementation.

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

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

Implements XSECCryptoProvider.

virtual XSECCryptoHash* OpenSSLCryptoProvider::hashSHA int  length = 160  )  [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:
OpenSSLCryptoHash

Implements XSECCryptoProvider.

virtual XSECCryptoHash* OpenSSLCryptoProvider::hashSHA1  )  [virtual]
 

Return a SHA1 implementation.

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

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

Implements XSECCryptoProvider.

virtual XSECCryptoKeyDSA* OpenSSLCryptoProvider::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:
OpenSSLCryptoKeyDSA

Implements XSECCryptoProvider.

virtual XSECCryptoKeyHMAC* OpenSSLCryptoProvider::keyHMAC void   )  [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.

Implements XSECCryptoProvider.

virtual XSECCryptoKeyRSA* OpenSSLCryptoProvider::keyRSA  )  [virtual]
 

Return an RSA key implementation object.

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

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

Implements XSECCryptoProvider.

virtual XSECCryptoSymmetricKey* OpenSSLCryptoProvider::keySymmetric XSECCryptoSymmetricKey::SymmetricKeyType  alg  )  [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

Implements XSECCryptoProvider.

virtual XSECCryptoX509* OpenSSLCryptoProvider::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:
OpenSSLCryptoX509

Implements XSECCryptoProvider.


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