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
00110 virtual bool encryptToSafeBuffer(
00111 TXFMChain * plainText,
00112 XENCEncryptionMethod * encryptionMethod,
00113 XSECCryptoKey * key,
00114 XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * doc,
00115 safeBuffer & result
00116 ) = 0;
00117
00119
00122
00143 virtual unsigned int decryptToSafeBuffer(
00144 TXFMChain * cipherText,
00145 XENCEncryptionMethod * encryptionMethod,
00146 XSECCryptoKey * key,
00147 XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * doc,
00148 safeBuffer & result
00149 ) = 0;
00150
00172 virtual bool appendDecryptCipherTXFM(
00173 TXFMChain * cipherText,
00174 XENCEncryptionMethod * encryptionMethod,
00175 XSECCryptoKey * key,
00176 XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * doc
00177 ) = 0;
00178
00179
00181
00184
00195 virtual XSECCryptoKey * createKeyForURI(
00196 const XMLCh * uri,
00197 unsigned char * keyBuffer,
00198 unsigned int keyLen
00199 ) = 0;
00200
00202
00205
00213 virtual XSECAlgorithmHandler * clone(void) const = 0;
00214
00216
00217 };
00218
00219
00220
00221 #endif
00222