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

XSECAlgorithmHandler.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2003-2005 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /*
00018  * XSEC
00019  *
00020  * XSECAlgorithmHandler := Interface class to define handling of
00021  *                         encryption and signature algorithms
00022  *
00023  * $Id: XSECAlgorithmHandler.hpp 422122 2006-07-15 00:58:21Z blautenb $
00024  *
00025  */
00026 
00027 #ifndef XSECALGHANDLER_INCLUDE
00028 #define XSECALGHANDLER_INCLUDE
00029 
00030 // XSEC Includes
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 // Xerces
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 
00212     virtual unsigned int signToSafeBuffer(
00213         TXFMChain * inputBytes,
00214         const XMLCh * URI,
00215         XSECCryptoKey * key,
00216         unsigned int outputLength,
00217         safeBuffer & result
00218     ) = 0;
00219 
00239     virtual bool verifyBase64Signature(
00240         TXFMChain * inputBytes,
00241         const XMLCh * URI,
00242         const char * sig,
00243         unsigned int outputLength,
00244         XSECCryptoKey * key
00245     ) = 0;
00246 
00248 
00251 
00264     virtual bool appendSignatureHashTxfm(
00265         TXFMChain * inputBytes,
00266         const XMLCh * URI,
00267         XSECCryptoKey * key
00268     ) = 0;
00269 
00282     virtual bool appendHashTxfm(
00283         TXFMChain * inputBytes,
00284         const XMLCh * URI
00285     ) = 0;
00286 
00288 
00289     
00292 
00303     virtual XSECCryptoKey * createKeyForURI(
00304         const XMLCh * uri,
00305         const unsigned char * keyBuffer,
00306         unsigned int keyLen
00307     ) = 0;
00308 
00310 
00313 
00321     virtual XSECAlgorithmHandler * clone(void) const = 0;
00322 
00324 
00325 };
00326 
00327 /*\@}*/
00328 
00329 #endif /* XSECALGHANDLER_INCLUDE*/
00330 

Generated on Sun Jan 28 19:37:24 2007 for XML-Security-C by  doxygen 1.4.2