00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef XSECALGHANDLER_INCLUDE
00028 #define XSECALGHANDLER_INCLUDE
00029
00030
00031
00032 #include <xsec/framework/XSECDefs.hpp>
00033
00034 class TXFMChain;
00035 class XENCEncryptionMethod;
00036 class XSECCryptoKey;
00037 class safeBuffer;
00038 class XSECBinTXFMInputStream;
00039
00040 XSEC_DECLARE_XERCES_CLASS(DOMDocument);
00041
00042
00043
00070 class XSECAlgorithmHandler {
00071
00072 public:
00073
00076
00077 virtual ~XSECAlgorithmHandler() {};
00078
00080
00083
00112 virtual bool encryptToSafeBuffer(
00113 TXFMChain * plainText,
00114 XENCEncryptionMethod * encryptionMethod,
00115 XSECCryptoKey * key,
00116 XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * doc,
00117 safeBuffer & result
00118 ) = 0;
00119
00121
00124
00147 virtual unsigned int decryptToSafeBuffer(
00148 TXFMChain * cipherText,
00149 XENCEncryptionMethod * encryptionMethod,
00150 XSECCryptoKey * key,
00151 XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * doc,
00152 safeBuffer & result
00153 ) = 0;
00154
00177 virtual bool appendDecryptCipherTXFM(
00178 TXFMChain * cipherText,
00179 XENCEncryptionMethod * encryptionMethod,
00180 XSECCryptoKey * key,
00181 XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * doc
00182 ) = 0;
00183
00184
00186
00189
00200 virtual XSECCryptoKey * createKeyForURI(
00201 const XMLCh * uri,
00202 unsigned char * keyBuffer,
00203 unsigned int keyLen
00204 ) = 0;
00205
00207
00210
00218 virtual XSECAlgorithmHandler * clone(void) const = 0;
00219
00221
00222 };
00223
00224
00225
00226 #endif
00227