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

XENCCipher.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  * XENCCipher := Interface definition for main encryption worker class
00021  *
00022  * $Id: XENCCipher.hpp,v 1.14 2005/02/03 13:58:14 milan Exp $
00023  *
00024  */
00025 
00026 #ifndef XENCCIPHER_INCLUDE
00027 #define XENCCIPHER_INCLUDE
00028 
00029 // XSEC Includes
00030 
00031 #include <xsec/framework/XSECDefs.hpp>
00032 #include <xsec/xenc/XENCCipherData.hpp>
00033 #include <xsec/dsig/DSIGConstants.hpp>
00034 
00035 // Xerces
00036 
00037 XSEC_DECLARE_XERCES_CLASS(DOMElement);
00038 XSEC_DECLARE_XERCES_CLASS(DOMDocument);
00039 XSEC_DECLARE_XERCES_CLASS(BinInputStream);
00040 
00041 class XSECCryptoKey;
00042 class XENCEncryptedData;
00043 class XENCEncryptedKey;
00044 class XSECKeyInfoResolver;
00045 class XSECBinTXFMInputStream;
00046 class TXFMChain;
00047 
00075 class XENCCipher {
00076 
00077 public:
00078     
00081     
00082     virtual ~XENCCipher() {};
00083 
00085 
00088 
00108     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * decryptElement(
00109         XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * element
00110     ) = 0;
00111 
00129     virtual XSECBinTXFMInputStream * decryptToBinInputStream(
00130         XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * element
00131     ) = 0;
00132 
00144     virtual int decryptKey(
00145         XENCEncryptedKey * encryptedKey,
00146         XMLByte * rawKey,
00147         int maxKeySize
00148     ) = 0;
00149 
00162     virtual int decryptKey(
00163         XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * keyNode,
00164         XMLByte * rawKey,
00165         int maxKeySize
00166     ) = 0;
00167 
00169 
00172 
00192     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * encryptElement(
00193         XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * element,
00194         encryptionMethod em,
00195         const XMLCh * algorithmURI = NULL
00196     ) = 0;
00197 
00218     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * encryptElementContent(
00219         XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * element,
00220         encryptionMethod em,
00221         const XMLCh * algorithmURI = NULL
00222     ) = 0;
00223 
00239     virtual XENCEncryptedKey * encryptKey(
00240         const unsigned char * keyBuffer,
00241         unsigned int keyLen,
00242         encryptionMethod em,
00243         const XMLCh * algorithmURI = NULL
00244     ) = 0;
00245 
00261     virtual XENCEncryptedData * encryptBinInputStream(
00262         XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream * plainText,
00263         encryptionMethod em,
00264         const XMLCh * algorithmURI = NULL
00265     ) = 0;
00266 
00285     virtual XENCEncryptedData * encryptTXFMChain(
00286         TXFMChain * plainText,
00287         encryptionMethod em,
00288         const XMLCh * algorithmURI = NULL
00289     ) = 0;
00290 
00292 
00294 
00304     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * getDocument(void) = 0;
00305 
00315     virtual const XMLCh * getXENCNSPrefix(void) const = 0;
00316 
00326     virtual XENCEncryptedData * getEncryptedData(void) = 0;
00327 
00334     virtual bool getPrettyPrint(void) = 0;
00335 
00337 
00340 
00351     virtual void setKey(XSECCryptoKey * key) = 0;
00352 
00366     virtual void setKEK(XSECCryptoKey * key) = 0;
00367 
00382     virtual void setKeyInfoResolver(const XSECKeyInfoResolver * resolver) = 0;
00383 
00391     virtual void setXENCNSPrefix(const XMLCh * prefix) = 0;
00392 
00404     virtual void setPrettyPrint(bool flag) = 0;
00405 
00407 
00410 
00431     virtual XENCEncryptedData * createEncryptedData(XENCCipherData::XENCCipherDataType type,
00432                                                     const XMLCh * algorithm,
00433                                                     const XMLCh * value) = 0;
00434 
00446     virtual XENCEncryptedKey * loadEncryptedKey(
00447         XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * keyNode
00448         ) = 0;
00449 
00451 
00452 };
00453 
00454 /*\@}*/
00455 
00456 #endif /* XENCCIPHER_INCLUDE */
00457 

Generated on Sun Jul 3 17:37:26 2005 for XML-Security-C by  doxygen 1.4.2