#include <XSECAlgorithmHandler.hpp>
Inheritance diagram for XSECAlgorithmHandler:
The XENCCipher class allows users and callers to register algorithm handlers for different Type URIs, as used in the various XML Signature or Encryption elements.
Default handlers are provided by the library, and are used to process all algorithms defined as mandatory (and many optional) within the standard.
Users can extend this class to provide custom algorithm handlers for their own classes.
Public Member Functions | |
Constructors and Destructors | |
virtual | ~XSECAlgorithmHandler () |
Encryption Methods | |
virtual bool | encryptToSafeBuffer (TXFMChain *plainText, XENCEncryptionMethod *encryptionMethod, XSECCryptoKey *key, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, safeBuffer &result)=0 |
Encrypt an input Transform chain to a safeBuffer. | |
Decryption Methods | |
virtual unsigned int | decryptToSafeBuffer (TXFMChain *cipherText, XENCEncryptionMethod *encryptionMethod, XSECCryptoKey *key, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, safeBuffer &result)=0 |
Decrypt an input Transform chain to a safeBuffer. | |
virtual bool | appendDecryptCipherTXFM (TXFMChain *cipherText, XENCEncryptionMethod *encryptionMethod, XSECCryptoKey *key, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc)=0 |
Append an appropriate decrypt TXFMer to a cipher txfm chain. | |
SigningMethods | |
virtual unsigned int | signToSafeBuffer (TXFMChain *inputBytes, const XMLCh *URI, XSECCryptoKey *key, unsigned int outputLength, safeBuffer &result)=0 |
Sign an input TXFMChain. | |
virtual bool | verifyBase64Signature (TXFMChain *inputBytes, const XMLCh *URI, const char *sig, unsigned int outputLength, XSECCryptoKey *key)=0 |
Validate a signature using an input TXFMChain. | |
Hash appending | |
virtual bool | appendSignatureHashTxfm (TXFMChain *inputBytes, const XMLCh *URI, XSECCryptoKey *key)=0 |
Append a signature hash to a TXFM Chain based on URI. | |
virtual bool | appendHashTxfm (TXFMChain *inputBytes, const XMLCh *URI)=0 |
Append a hash to a TXFM Chain based on URI. | |
Key handling | |
virtual XSECCryptoKey * | createKeyForURI (const XMLCh *uri, const unsigned char *keyBuffer, unsigned int keyLen)=0 |
Create a key that will support a given URI. | |
Miscellaneous Functions | |
virtual XSECAlgorithmHandler * | clone (void) const =0 |
Create a new instance of the handler. |
|
|
|
Append an appropriate decrypt TXFMer to a cipher txfm chain. This method takes a TXFMChain that will provide the cipher text data, and appends the appropriate cipher transformer to decrypt the output. The EncryptionMethod object is provided so that any algorithm specific parameters can be found by the processor. It also allows applications to embed multiple algorithms in a single processing object. The Type value can then be read from the EncryptionMethod object to determine what to do.
Implemented in DSIGAlgorithmHandlerDefault. |
|
Append a hash to a TXFM Chain based on URI. Given a URI string create the appropriate hash TXFM. NOTE the input URI should be a "stright" (i.e. non-signature) hash algorithm URI - e.g. #sha1
Implemented in DSIGAlgorithmHandlerDefault. |
|
Append a signature hash to a TXFM Chain based on URI. Given a URI string create the appropriate hash TXFM. NOTE the input URI should be a SIGNATURE URI - e.g. #hash-sha1
Implemented in DSIGAlgorithmHandlerDefault. |
|
Create a new instance of the handler. Provides a means for the library to create a new instance of the object without knowing its type Implemented in DSIGAlgorithmHandlerDefault. |
|
Create a key that will support a given URI. Given a URI string and a raw bit string, create the associated key
Implemented in DSIGAlgorithmHandlerDefault. |
|
Decrypt an input Transform chain to a safeBuffer. This method takes a TXFMChain that will provide the cipher text data, and places the output in a safeBuffer. The EncryptionMethod object is provided so that any algorithm specific parameters can be found by the processor. It also allows applications to embed multiple algorithms in a single processing object. The Type value can then be read from the EncryptionMethod object to determine what to do.
Implemented in DSIGAlgorithmHandlerDefault. |
|
Encrypt an input Transform chain to a safeBuffer. This method takes a TXFMChain that will provide the plain text data, and places the encrypted and base64 encoded output in a safeBuffer. The EncryptionMethod object is provided so that any algorithm specific parameters can be embedded by the processor. Default parameters can be set directly (OAEParams and KeySize). Anything additional will need to be set within the DOM directly.
Implemented in DSIGAlgorithmHandlerDefault. |
|
Sign an input TXFMChain. This method takes a TXFMChain that will provide the plain text data, and places a (null terminated) base64 encoded hash into a result safeBuffer. Unlike the encryption methods, the URI must also be passed in, as a single AlgorithmHandler might be used to support multiple different signing algorithms, but the overhead of passing in the entire SignedInfo is not required.
Implemented in DSIGAlgorithmHandlerDefault. |
|
Validate a signature using an input TXFMChain. Using the input plain text bytes (in the form of a transform chain) validate the associated base64 encoded signature using the supplied key. The URI value is used to determine the algorithm to be called upon to validate the signature.
Implemented in DSIGAlgorithmHandlerDefault. |