santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Lautenbach <be...@wingsofhermes.org>
Subject Re: xml encryption/decryption of binary data
Date Fri, 31 Mar 2006 08:59:14 GMT
Christophe,

I'm not 100% sure I understand the problems, but I'll try to give some
thoughts.

The xml header is added (or not added) as part of the serialisation
process.  How do you serialise your document once you have done the
encryption?

For the decrypt - that looks fine.  Can you post more code?  I'm not an
expert on the Java library, but others on the list may be able to assist
with more code to look at.

It is possible to do encryption of binary data, but you cannot simply
add it to the document.  If you want it inside the XML, you need to
encode it (generally base64) and then add it.  The resultant XML can
then be encrypted.

The alternative is to place the binary data in a separate file and have
a reference to that file in the XML document.  But I don't think that is
quite what you want.

Cheers,
	Berin


Larchier Christophe wrote:
> Nobody uses xml encryption with binary datas ???
>  
> 
>     -----Message d'origine-----
>     *De :* Larchier Christophe [mailto:clarchier@axway.com]
>     *Envoyé :* mercredi 29 mars 2006 17:41
>     *À :* security-dev@xml.apache.org
>     *Objet :* xml encryption/decryption of binary data
> 
>     Hi all,
> 
>     When I use apache xml security library to encrypt an xml document
>     like the following one, the xml header is loosen.
> 
>     <?xml version="1.0" encoding="UTF-8"?>
> 
>     <PurchaseOrder>
>     ...
>     </PurchaseOrder>
> 
> 
>     After encrypting/decrypting, I get only :
> 
>     <PurchaseOrder>
>     ...
>     </PurchaseOrder>
> 
> 
>     I use the doFinal() method to encrypt/decrypt with the all document
>     as parameter :
>     xmlCipher.doFinal(doc, doc);
> 
> 
>     How do you manage this ?
> 
>     Is it possible to do xml encryption with binary datas ?
>     I have tried to insert my binary datas into a dom document, but some
>     special characters are added (to replace < > \).
> 
>     Thanks,
>     Christophe
> 

Mime
View raw message