2 * Copyright 2001-2006 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 * Implementation classes for XML Encryption schema
24 #include "AbstractAttributeExtensibleXMLObject.h"
25 #include "AbstractChildlessElement.h"
26 #include "AbstractElementProxy.h"
27 #include "exceptions.h"
28 #include "encryption/Encryption.h"
29 #include "io/AbstractXMLObjectMarshaller.h"
30 #include "io/AbstractXMLObjectUnmarshaller.h"
31 #include "util/XMLHelper.h"
33 #include <xercesc/util/XMLUniDefs.hpp>
35 using namespace xmlencryption;
36 using namespace xmltooling;
39 #if defined (_MSC_VER)
40 #pragma warning( push )
41 #pragma warning( disable : 4250 4251 )
44 namespace xmlencryption {
46 DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,CarriedKeyName);
47 DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,CipherValue);
48 DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,KeySize);
49 DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,OAEPparams);
51 class XMLTOOL_DLLLOCAL EncryptionMethodImpl : public virtual EncryptionMethod,
52 public AbstractComplexElement,
53 public AbstractDOMCachingXMLObject,
54 public AbstractXMLObjectMarshaller,
55 public AbstractXMLObjectUnmarshaller
61 m_children.push_back(NULL);
62 m_children.push_back(NULL);
63 m_pos_KeySize=m_children.begin();
64 m_pos_OAEPparams=m_pos_KeySize;
68 virtual ~EncryptionMethodImpl() {
69 XMLString::release(&m_Algorithm);
72 EncryptionMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
73 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
77 EncryptionMethodImpl(const EncryptionMethodImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
79 setAlgorithm(src.getAlgorithm());
81 setKeySize(src.getKeySize()->cloneKeySize());
82 if (src.getOAEPparams())
83 setOAEPparams(src.getOAEPparams()->cloneOAEPparams());
84 VectorOf(XMLObject) v=getOtherParameters();
85 for (vector<XMLObject*>::const_iterator i=src.m_OtherParameters.begin(); i!=src.m_OtherParameters.end(); i++) {
87 v.push_back((*i)->clone());
92 IMPL_XMLOBJECT_CLONE(EncryptionMethod);
93 IMPL_STRING_ATTRIB(Algorithm);
94 IMPL_TYPED_CHILD(KeySize);
95 IMPL_TYPED_CHILD(OAEPparams);
96 IMPL_XMLOBJECT_CHILDREN(OtherParameter,m_children.end());
99 void marshallAttributes(DOMElement* domElement) const {
100 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,NULL);
103 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
104 PROC_TYPED_CHILD(KeySize,XMLConstants::XMLENC_NS,false);
105 PROC_TYPED_CHILD(OAEPparams,XMLConstants::XMLENC_NS,false);
108 const XMLCh* nsURI=root->getNamespaceURI();
109 if (!XMLString::equals(nsURI,XMLConstants::XMLENC_NS) && nsURI && *nsURI) {
110 getOtherParameters().push_back(childXMLObject);
114 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
117 void processAttribute(const DOMAttr* attribute) {
118 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,NULL);
119 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
123 class XMLTOOL_DLLLOCAL TransformsImpl : public virtual Transforms,
124 public AbstractComplexElement,
125 public AbstractDOMCachingXMLObject,
126 public AbstractXMLObjectMarshaller,
127 public AbstractXMLObjectUnmarshaller
130 virtual ~TransformsImpl() {}
132 TransformsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
133 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
136 TransformsImpl(const TransformsImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
137 VectorOf(xmlsignature::Transform) v=getTransforms();
138 for (vector<xmlsignature::Transform*>::const_iterator i=src.m_Transforms.begin(); i!=src.m_Transforms.end(); i++) {
140 v.push_back((*i)->cloneTransform());
145 IMPL_XMLOBJECT_CLONE(Transforms);
146 IMPL_TYPED_FOREIGN_CHILDREN(Transform,xmlsignature,m_children.end());
149 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
150 PROC_TYPED_FOREIGN_CHILDREN(Transform,xmlsignature,XMLConstants::XMLSIG_NS,false);
151 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
155 class XMLTOOL_DLLLOCAL CipherReferenceImpl : public virtual CipherReference,
156 public AbstractComplexElement,
157 public AbstractDOMCachingXMLObject,
158 public AbstractXMLObjectMarshaller,
159 public AbstractXMLObjectUnmarshaller
164 m_children.push_back(NULL);
165 m_pos_Transforms=m_children.begin();
168 virtual ~CipherReferenceImpl() {
169 XMLString::release(&m_URI);
172 CipherReferenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
173 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
177 CipherReferenceImpl(const CipherReferenceImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
179 setURI(src.getURI());
180 if (src.getTransforms())
181 setTransforms(src.getTransforms()->cloneTransforms());
184 IMPL_XMLOBJECT_CLONE(CipherReference);
185 IMPL_STRING_ATTRIB(URI);
186 IMPL_TYPED_CHILD(Transforms);
189 void marshallAttributes(DOMElement* domElement) const {
190 MARSHALL_STRING_ATTRIB(URI,URI,NULL);
193 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
194 PROC_TYPED_CHILD(Transforms,XMLConstants::XMLENC_NS,false);
195 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
198 void processAttribute(const DOMAttr* attribute) {
199 PROC_STRING_ATTRIB(URI,URI,NULL);
200 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
204 class XMLTOOL_DLLLOCAL CipherDataImpl : public virtual CipherData,
205 public AbstractComplexElement,
206 public AbstractDOMCachingXMLObject,
207 public AbstractXMLObjectMarshaller,
208 public AbstractXMLObjectUnmarshaller
212 m_CipherReference=NULL;
213 m_children.push_back(NULL);
214 m_children.push_back(NULL);
215 m_pos_CipherValue=m_children.begin();
216 m_pos_CipherReference=m_pos_CipherValue;
217 ++m_pos_CipherReference;
220 virtual ~CipherDataImpl() {}
222 CipherDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
223 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
227 CipherDataImpl(const CipherDataImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
229 if (src.getCipherValue())
230 setCipherValue(src.getCipherValue()->cloneCipherValue());
231 if (src.getCipherReference())
232 setCipherReference(src.getCipherReference()->cloneCipherReference());
235 IMPL_XMLOBJECT_CLONE(CipherData);
236 IMPL_TYPED_CHILD(CipherValue);
237 IMPL_TYPED_CHILD(CipherReference);
240 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
241 PROC_TYPED_CHILD(CipherValue,XMLConstants::XMLENC_NS,false);
242 PROC_TYPED_CHILD(CipherReference,XMLConstants::XMLENC_NS,false);
243 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
247 class XMLTOOL_DLLLOCAL EncryptionPropertyImpl : public virtual EncryptionProperty,
248 public AbstractElementProxy,
249 public AbstractAttributeExtensibleXMLObject,
250 public AbstractDOMCachingXMLObject,
251 public AbstractXMLObjectMarshaller,
252 public AbstractXMLObjectUnmarshaller
258 virtual ~EncryptionPropertyImpl() {
259 XMLString::release(&m_Id);
260 XMLString::release(&m_Target);
263 EncryptionPropertyImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
264 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
268 EncryptionPropertyImpl(const EncryptionPropertyImpl& src)
269 : AbstractXMLObject(src),
270 AbstractElementProxy(src),
271 AbstractAttributeExtensibleXMLObject(src),
272 AbstractDOMCachingXMLObject(src) {
275 setTarget(src.getTarget());
276 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
278 getXMLObjects().push_back((*i)->clone());
283 IMPL_XMLOBJECT_CLONE(EncryptionProperty);
285 IMPL_STRING_ATTRIB(Target);
287 void setAttribute(QName& qualifiedName, const XMLCh* value) {
288 if (!qualifiedName.hasNamespaceURI()) {
289 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
293 else if (XMLString::equals(qualifiedName.getLocalPart(),TARGET_ATTRIB_NAME)) {
298 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
302 void marshallAttributes(DOMElement* domElement) const {
303 MARSHALL_ID_ATTRIB(Id,ID,NULL);
304 MARSHALL_STRING_ATTRIB(Target,TARGET,NULL);
305 marshallExtensionAttributes(domElement);
308 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
309 getXMLObjects().push_back(childXMLObject);
312 void processAttribute(const DOMAttr* attribute) {
313 PROC_ID_ATTRIB(Id,ID,NULL);
314 unmarshallExtensionAttribute(attribute);
318 class XMLTOOL_DLLLOCAL EncryptionPropertiesImpl : public virtual EncryptionProperties,
319 public AbstractComplexElement,
320 public AbstractDOMCachingXMLObject,
321 public AbstractXMLObjectMarshaller,
322 public AbstractXMLObjectUnmarshaller
328 virtual ~EncryptionPropertiesImpl() {
329 XMLString::release(&m_Id);
332 EncryptionPropertiesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
333 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
337 EncryptionPropertiesImpl(const EncryptionPropertiesImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
340 VectorOf(EncryptionProperty) v=getEncryptionPropertys();
341 for (vector<EncryptionProperty*>::const_iterator i=src.m_EncryptionPropertys.begin(); i!=src.m_EncryptionPropertys.end(); i++) {
343 v.push_back((*i)->cloneEncryptionProperty());
348 IMPL_XMLOBJECT_CLONE(EncryptionProperties);
350 IMPL_TYPED_CHILDREN(EncryptionProperty,m_children.end());
353 void marshallAttributes(DOMElement* domElement) const {
354 MARSHALL_ID_ATTRIB(Id,ID,NULL);
357 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
358 PROC_TYPED_CHILDREN(EncryptionProperty,XMLConstants::XMLENC_NS,false);
359 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
362 void processAttribute(const DOMAttr* attribute) {
363 PROC_ID_ATTRIB(Id,ID,NULL);
364 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
368 class XMLTOOL_DLLLOCAL ReferenceTypeImpl : public virtual ReferenceType,
369 public AbstractElementProxy,
370 public AbstractDOMCachingXMLObject,
371 public AbstractXMLObjectMarshaller,
372 public AbstractXMLObjectUnmarshaller
379 ReferenceTypeImpl() {
384 virtual ~ReferenceTypeImpl() {
385 XMLString::release(&m_URI);
388 ReferenceTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
389 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
393 ReferenceTypeImpl(const ReferenceTypeImpl& src)
394 : AbstractXMLObject(src), AbstractElementProxy(src), AbstractDOMCachingXMLObject(src) {
396 setURI(src.getURI());
397 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
399 getXMLObjects().push_back((*i)->clone());
404 IMPL_XMLOBJECT_CLONE(ReferenceType);
405 IMPL_STRING_ATTRIB(URI);
408 void marshallAttributes(DOMElement* domElement) const {
409 MARSHALL_STRING_ATTRIB(URI,URI,NULL);
412 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
413 getXMLObjects().push_back(childXMLObject);
416 void processAttribute(const DOMAttr* attribute) {
417 PROC_STRING_ATTRIB(URI,URI,NULL);
418 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
422 class XMLTOOL_DLLLOCAL DataReferenceImpl : public virtual DataReference, public ReferenceTypeImpl
425 virtual ~DataReferenceImpl() {}
427 DataReferenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
428 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
430 DataReferenceImpl(const DataReferenceImpl& src) : AbstractXMLObject(src), ReferenceTypeImpl(src) {}
432 IMPL_XMLOBJECT_CLONE(DataReference);
433 ReferenceType* cloneReferenceType() const {
434 return new DataReferenceImpl(*this);
438 class XMLTOOL_DLLLOCAL KeyReferenceImpl : public virtual KeyReference, public ReferenceTypeImpl
441 virtual ~KeyReferenceImpl() {}
443 KeyReferenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
444 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
446 KeyReferenceImpl(const KeyReferenceImpl& src) : AbstractXMLObject(src), ReferenceTypeImpl(src) {}
448 IMPL_XMLOBJECT_CLONE(KeyReference);
449 ReferenceType* cloneReferenceType() const {
450 return new KeyReferenceImpl(*this);
454 class XMLTOOL_DLLLOCAL ReferenceListImpl : public virtual ReferenceList,
455 public AbstractComplexElement,
456 public AbstractDOMCachingXMLObject,
457 public AbstractXMLObjectMarshaller,
458 public AbstractXMLObjectUnmarshaller
461 virtual ~ReferenceListImpl() {}
463 ReferenceListImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
464 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
467 ReferenceListImpl(const ReferenceListImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
468 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
470 DataReference* data=dynamic_cast<DataReference*>(*i);
472 getDataReferences().push_back(data->cloneDataReference());
476 KeyReference* key=dynamic_cast<KeyReference*>(*i);
478 getKeyReferences().push_back(key->cloneKeyReference());
485 IMPL_XMLOBJECT_CLONE(ReferenceList);
486 IMPL_TYPED_CHILDREN(DataReference,m_children.end());
487 IMPL_TYPED_CHILDREN(KeyReference,m_children.end());
490 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
491 PROC_TYPED_CHILDREN(DataReference,XMLConstants::XMLENC_NS,false);
492 PROC_TYPED_CHILDREN(KeyReference,XMLConstants::XMLENC_NS,false);
493 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
497 class XMLTOOL_DLLLOCAL EncryptedTypeImpl : public virtual EncryptedType,
498 public AbstractComplexElement,
499 public AbstractDOMCachingXMLObject,
500 public AbstractXMLObjectMarshaller,
501 public AbstractXMLObjectUnmarshaller
504 m_Id=m_Type=m_MimeType=m_Encoding=NULL;
505 m_EncryptionMethod=NULL;
508 m_EncryptionProperties=NULL;
509 m_children.push_back(NULL);
510 m_children.push_back(NULL);
511 m_children.push_back(NULL);
512 m_children.push_back(NULL);
513 m_pos_EncryptionMethod=m_children.begin();
514 m_pos_KeyInfo=m_pos_EncryptionMethod;
516 m_pos_CipherData=m_pos_KeyInfo;
518 m_pos_EncryptionProperties=m_pos_CipherData;
519 ++m_pos_EncryptionProperties;
522 EncryptedTypeImpl() {
527 virtual ~EncryptedTypeImpl() {
528 XMLString::release(&m_Id);
529 XMLString::release(&m_Type);
530 XMLString::release(&m_MimeType);
531 XMLString::release(&m_Encoding);
534 EncryptedTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
535 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
539 EncryptedTypeImpl(const EncryptedTypeImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
542 setType(src.getType());
543 setMimeType(src.getMimeType());
544 setEncoding(src.getEncoding());
545 if (src.getEncryptionMethod())
546 setEncryptionMethod(src.getEncryptionMethod()->cloneEncryptionMethod());
547 if (src.getKeyInfo())
548 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
549 if (src.getCipherData())
550 setCipherData(src.getCipherData()->cloneCipherData());
551 if (src.getEncryptionProperties())
552 setEncryptionProperties(src.getEncryptionProperties()->cloneEncryptionProperties());
555 IMPL_XMLOBJECT_CLONE(EncryptedType);
557 IMPL_STRING_ATTRIB(Type);
558 IMPL_STRING_ATTRIB(MimeType);
559 IMPL_STRING_ATTRIB(Encoding);
560 IMPL_TYPED_CHILD(EncryptionMethod);
561 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
562 IMPL_TYPED_CHILD(CipherData);
563 IMPL_TYPED_CHILD(EncryptionProperties);
566 void marshallAttributes(DOMElement* domElement) const {
567 MARSHALL_ID_ATTRIB(Id,ID,NULL);
568 MARSHALL_STRING_ATTRIB(Type,TYPE,NULL);
569 MARSHALL_STRING_ATTRIB(MimeType,MIMETYPE,NULL);
570 MARSHALL_STRING_ATTRIB(Encoding,ENCODING,NULL);
573 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
574 PROC_TYPED_CHILD(EncryptionMethod,XMLConstants::XMLENC_NS,false);
575 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLConstants::XMLSIG_NS,false);
576 PROC_TYPED_CHILD(CipherData,XMLConstants::XMLENC_NS,false);
577 PROC_TYPED_CHILD(EncryptionProperties,XMLConstants::XMLENC_NS,false);
578 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
581 void processAttribute(const DOMAttr* attribute) {
582 PROC_ID_ATTRIB(Id,ID,NULL);
583 PROC_STRING_ATTRIB(Type,TYPE,NULL);
584 PROC_STRING_ATTRIB(MimeType,MIMETYPE,NULL);
585 PROC_STRING_ATTRIB(Encoding,ENCODING,NULL);
586 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
590 class XMLTOOL_DLLLOCAL EncryptedDataImpl : public virtual EncryptedData, public EncryptedTypeImpl
593 virtual ~EncryptedDataImpl() {}
595 EncryptedDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
596 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
598 EncryptedDataImpl(const EncryptedDataImpl& src) : AbstractXMLObject(src), EncryptedTypeImpl(src) {}
600 IMPL_XMLOBJECT_CLONE(EncryptedData);
601 EncryptedType* cloneEncryptedType() const {
602 return new EncryptedDataImpl(*this);
606 class XMLTOOL_DLLLOCAL EncryptedKeyImpl : public virtual EncryptedKey, public EncryptedTypeImpl
610 m_ReferenceList=NULL;
611 m_CarriedKeyName=NULL;
612 m_children.push_back(NULL);
613 m_children.push_back(NULL);
614 m_pos_ReferenceList=m_pos_EncryptionProperties;
615 ++m_pos_ReferenceList;
616 m_pos_CarriedKeyName=m_pos_ReferenceList;
617 ++m_pos_CarriedKeyName;
621 virtual ~EncryptedKeyImpl() {
622 XMLString::release(&m_Recipient);
625 EncryptedKeyImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
626 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
630 EncryptedKeyImpl(const EncryptedKeyImpl& src) : AbstractXMLObject(src), EncryptedTypeImpl(src) {
634 IMPL_XMLOBJECT_CLONE(EncryptedKey);
635 EncryptedType* cloneEncryptedType() const {
636 return new EncryptedKeyImpl(*this);
638 IMPL_STRING_ATTRIB(Recipient);
639 IMPL_TYPED_CHILD(ReferenceList);
640 IMPL_TYPED_CHILD(CarriedKeyName);
643 void marshallAttributes(DOMElement* domElement) const {
644 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
645 EncryptedTypeImpl::marshallAttributes(domElement);
648 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
649 PROC_TYPED_CHILD(ReferenceList,XMLConstants::XMLENC_NS,false);
650 PROC_TYPED_CHILD(CarriedKeyName,XMLConstants::XMLENC_NS,false);
651 EncryptedTypeImpl::processChildElement(childXMLObject,root);
654 void processAttribute(const DOMAttr* attribute) {
655 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
656 EncryptedTypeImpl::processAttribute(attribute);
662 #if defined (_MSC_VER)
663 #pragma warning( pop )
666 // Builder Implementations
668 IMPL_XMLOBJECTBUILDER(CarriedKeyName);
669 IMPL_XMLOBJECTBUILDER(CipherData);
670 IMPL_XMLOBJECTBUILDER(CipherReference);
671 IMPL_XMLOBJECTBUILDER(CipherValue);
672 IMPL_XMLOBJECTBUILDER(DataReference);
673 IMPL_XMLOBJECTBUILDER(EncryptedData);
674 IMPL_XMLOBJECTBUILDER(EncryptedKey);
675 IMPL_XMLOBJECTBUILDER(EncryptionMethod);
676 IMPL_XMLOBJECTBUILDER(EncryptionProperties);
677 IMPL_XMLOBJECTBUILDER(EncryptionProperty);
678 IMPL_XMLOBJECTBUILDER(KeyReference);
679 IMPL_XMLOBJECTBUILDER(KeySize);
680 IMPL_XMLOBJECTBUILDER(OAEPparams);
681 IMPL_XMLOBJECTBUILDER(ReferenceList);
682 IMPL_XMLOBJECTBUILDER(Transforms);
686 const XMLCh CarriedKeyName::LOCAL_NAME[] = UNICODE_LITERAL_14(C,a,r,r,i,e,d,K,e,y,N,a,m,e);
687 const XMLCh CipherData::LOCAL_NAME[] = UNICODE_LITERAL_10(C,i,p,h,e,r,D,a,t,a);
688 const XMLCh CipherData::TYPE_NAME[] = UNICODE_LITERAL_14(C,i,p,h,e,r,D,a,t,a,T,y,p,e);
689 const XMLCh CipherReference::LOCAL_NAME[] = UNICODE_LITERAL_15(C,i,p,h,e,r,R,e,f,e,r,e,n,c,e);
690 const XMLCh CipherReference::TYPE_NAME[] = UNICODE_LITERAL_19(C,i,p,h,e,r,R,e,f,e,r,e,n,c,e,T,y,p,e);
691 const XMLCh CipherReference::URI_ATTRIB_NAME[] = UNICODE_LITERAL_3(U,R,I);
692 const XMLCh CipherValue::LOCAL_NAME[] = UNICODE_LITERAL_11(C,i,p,h,e,r,V,a,l,u,e);
693 const XMLCh DataReference::LOCAL_NAME[] = UNICODE_LITERAL_13(D,a,t,a,R,e,f,e,r,e,n,c,e);
694 const XMLCh EncryptedData::LOCAL_NAME[] = UNICODE_LITERAL_13(E,n,c,r,y,p,t,e,d,D,a,t,a);
695 const XMLCh EncryptedData::TYPE_NAME[] = UNICODE_LITERAL_17(E,n,c,r,y,p,t,e,d,D,a,t,a,T,y,p,e);
696 const XMLCh EncryptedKey::LOCAL_NAME[] = UNICODE_LITERAL_12(E,n,c,r,y,p,t,e,d,K,e,y);
697 const XMLCh EncryptedKey::TYPE_NAME[] = UNICODE_LITERAL_16(E,n,c,r,y,p,t,e,d,K,e,y,T,y,p,e);
698 const XMLCh EncryptedKey::RECIPIENT_ATTRIB_NAME[] = UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
699 const XMLCh EncryptedType::LOCAL_NAME[] = {chNull};
700 const XMLCh EncryptedType::TYPE_NAME[] = UNICODE_LITERAL_13(E,n,c,r,y,p,t,e,d,T,y,p,e);
701 const XMLCh EncryptedType::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d);
702 const XMLCh EncryptedType::TYPE_ATTRIB_NAME[] = UNICODE_LITERAL_4(T,y,p,e);
703 const XMLCh EncryptedType::MIMETYPE_ATTRIB_NAME[] = UNICODE_LITERAL_8(M,i,m,e,T,y,p,e);
704 const XMLCh EncryptedType::ENCODING_ATTRIB_NAME[] = UNICODE_LITERAL_8(E,n,c,o,d,i,n,g);
705 const XMLCh EncryptionMethod::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,c,r,y,p,t,i,o,n,M,e,t,h,o,d);
706 const XMLCh EncryptionMethod::TYPE_NAME[] = UNICODE_LITERAL_20(E,n,c,r,y,p,t,i,o,n,M,e,t,h,o,d,T,y,p,e);
707 const XMLCh EncryptionMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
708 const XMLCh EncryptionProperties::LOCAL_NAME[] = UNICODE_LITERAL_20(E,n,c,r,y,p,t,i,o,n,P,r,o,p,e,r,t,i,e,s);
709 const XMLCh EncryptionProperties::TYPE_NAME[] = UNICODE_LITERAL_24(E,n,c,r,y,p,t,i,o,n,P,r,o,p,e,r,t,i,e,s,T,y,p,e);
710 const XMLCh EncryptionProperties::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d);
711 const XMLCh EncryptionProperty::LOCAL_NAME[] = UNICODE_LITERAL_18(E,n,c,r,y,p,t,i,o,n,P,r,o,p,e,r,t,y);
712 const XMLCh EncryptionProperty::TYPE_NAME[] = UNICODE_LITERAL_22(E,n,c,r,y,p,t,i,o,n,P,r,o,p,e,r,t,y,T,y,p,e);
713 const XMLCh EncryptionProperty::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d);
714 const XMLCh EncryptionProperty::TARGET_ATTRIB_NAME[] = UNICODE_LITERAL_6(T,a,r,g,e,t);
715 const XMLCh KeyReference::LOCAL_NAME[] = UNICODE_LITERAL_12(K,e,y,R,e,f,e,r,e,n,c,e);
716 const XMLCh KeySize::LOCAL_NAME[] = UNICODE_LITERAL_7(K,e,y,S,i,z,e);
717 const XMLCh OAEPparams::LOCAL_NAME[] = UNICODE_LITERAL_10(O,A,E,P,p,a,r,a,m,s);
718 const XMLCh ReferenceList::LOCAL_NAME[] = UNICODE_LITERAL_13(R,e,f,e,r,e,n,c,e,L,i,s,t);
719 const XMLCh ReferenceType::LOCAL_NAME[] = {chNull};
720 const XMLCh ReferenceType::TYPE_NAME[] = UNICODE_LITERAL_13(R,e,f,e,r,e,n,c,e,T,y,p,e);
721 const XMLCh ReferenceType::URI_ATTRIB_NAME[] = UNICODE_LITERAL_3(U,R,I);
722 const XMLCh Transforms::LOCAL_NAME[] = UNICODE_LITERAL_10(T,r,a,n,s,f,o,r,m,s);
723 const XMLCh Transforms::TYPE_NAME[] = UNICODE_LITERAL_14(T,r,a,n,s,f,o,r,m,s,T,y,p,e);