#include <XSECPlatformUtils.hpp>
Collaboration diagram for XSECPlatformUtils:
This class is used primarily to initialise the library and communicate high level parameters that will be common to all objects from the class in any given session.
It is primarily a static class.
Static Public Member Functions | |
static void | Initialise (XSECCryptoProvider *p=NULL) |
Initialise the library. | |
static void | SetCryptoProvider (XSECCryptoProvider *p) |
Set a new crypto provider. | |
static void | registerAlgorithmHandler (const XMLCh *uri, const XSECAlgorithmHandler &handler) |
Add a new algorithm Handler. | |
static void | Terminate (void) |
Terminate. | |
Static Public Attributes | |
static int | initCount |
Number of times initialise has been called. | |
static XSECCryptoProvider * | g_cryptoProvider |
The main cryptographic provider. | |
static const XSECAlgorithmMapper * | g_algorithmMapper |
The global Algorithm Mapper. |
|
Initialise the library. Must be called prior to using any functions in the library. Primarily sets up static variables used by all classes in the library.
|
|
Add a new algorithm Handler. Application developers can extend the XSECAlgorithmHandler class to implement new cryptographic algorithms. This will then allow the library to call the provided handler whenever trying to process a type it doesn't understand. Any handler previously registered for this URI will be overwritten, allowing callers to overwrite the handlers for default URIs.
|
|
Set a new crypto provider. Set the crypto provider to the value passed in. Any current provider is deleted.
|
|
Terminate. Should be called prior to any program exist to allow the library to cleanly delete any memory associated with the library as a whole.
|
|
The global Algorithm Mapper. The algorithm mapper is used to map algorithm type URI strings to algorithm implementations. Note that this is a level of indirection above actual cryptographic algorithms. For example: URI = http://www.w3.org/2001/04/xmlenc#tripledes-cbc is the URI for 3DES in CBC mode. The mapper will return an algorithm handler that understands what this means in terms of IVs and how to call the XSECCryptoKey interface. It then uses the cryptographic provider to actually perform the encryption. This allows applications to provide new algorithm types. The mapper is used to map the type string to the means of doing the encryption, and a new XSECCryptoKey derivative can be provided to perform the actual crypo work.
|
|
The main cryptographic provider. This pointer can be used to determine the primary crypto provider registered in the library. Individual signatures can over-ride this default. |
|
Number of times initialise has been called. initCount can be read by any class or function to determine how many times the library has been initialised. |