I think there is a problem in the decryption process of the XMLCipher class. To put the problem across, here's my question:
If there is some whitespace between the tags of EncryptedData and its parent (See the example below) and the Type attribute of the EncryptedData corresponds to "element content", then the current implementation simply replaces the EncryptedData with the decrypted DocumentFragment. Shouldn't it first remove the existing contents (whitespace, etc) of the parent node of EncryptedData and then do an appendChild(DocumentFragment) on the parent?
<CreditCard Limit='5,000' Currency='USD'>
<EncryptedData xmlns='http://www.w3.org/2001/04/xmlenc#'
Type='http://www.w3.org/2001/04/xmlenc#Content'>
<CipherData>
<CipherValue>A23B45C56</CipherValue>
</CipherData>
</EncryptedData>
</CreditCard>If this is accepted as a bug, I even have a patch for it. Should I also raise a bugzilla?
Thanks, Vishal
