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 * XENCEncryptedType := Definition for holder object for EncryptedType 00021 * element 00022 * 00023 * Author(s): Berin Lautenbach 00024 * 00025 * $Id: XENCEncryptedType.hpp 351364 2005-06-04 11:30:26Z blautenb $ 00026 * 00027 */ 00028 00029 #ifndef XENCENCRYPTEDTYPE_INCLUDE 00030 #define XENCENCRYPTEDTYPE_INCLUDE 00031 00032 // XSEC Includes 00033 00034 #include <xsec/framework/XSECDefs.hpp> 00035 00036 class XENCCipherData; 00037 class DSIGKeyInfoList; 00038 class DSIGKeyInfoName; 00039 class DSIGKeyInfoValue; 00040 class DSIGKeyInfoX509; 00041 class XENCEncryptionMethod; 00042 class XENCEncryptedKey; 00043 00082 class XENCEncryptedType { 00083 00086 00087 protected: 00088 00089 XENCEncryptedType() {}; 00090 00091 public: 00092 00093 virtual ~XENCEncryptedType() {}; 00094 00097 00107 virtual XENCCipherData * getCipherData(void) const = 0; 00108 00121 virtual XENCEncryptionMethod * getEncryptionMethod(void) const = 0; 00122 00129 virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) const = 0; 00130 00132 00135 00148 virtual const XMLCh * getType(void) const = 0; 00149 00164 virtual const XMLCh * getMimeType(void) const = 0; 00165 00179 virtual const XMLCh * getEncoding(void) const = 0; 00180 00182 00185 00198 virtual void setType(const XMLCh * uri) = 0; 00199 00215 virtual void setMimeType(const XMLCh * mimeType) = 0; 00216 00232 virtual void setEncoding(const XMLCh * uri) = 0; 00233 00235 00239 00255 virtual DSIGKeyInfoList * getKeyInfoList(void) = 0; 00256 00265 virtual void clearKeyInfo(void) = 0; 00266 00279 virtual DSIGKeyInfoValue * appendDSAKeyValue(const XMLCh * P, 00280 const XMLCh * Q, 00281 const XMLCh * G, 00282 const XMLCh * Y) = 0; 00283 00294 virtual DSIGKeyInfoValue * appendRSAKeyValue(const XMLCh * modulus, 00295 const XMLCh * exponent) = 0; 00296 00308 virtual DSIGKeyInfoX509 * appendX509Data(void) = 0; 00309 00320 virtual DSIGKeyInfoName * appendKeyName(const XMLCh * name, bool isDName = false) = 0; 00321 00333 virtual void appendEncryptedKey(XENCEncryptedKey * encryptedKey) = 0; 00335 00336 private: 00337 00338 // Unimplemented 00339 XENCEncryptedType(const XENCEncryptedType &); 00340 XENCEncryptedType & operator = (const XENCEncryptedType &); 00341 00342 }; 00343 00344 #endif /* XENCENCRYPTEDTYPE_INCLUDE */