Hi,
 
I have an external document attached to my XML document and I would to encrypt it. Finally, I expect to have in my XML document the following result bellow.
 
How do I have to proceed, I didn't find a way how to encrypt an external reference using Apache XML security.
 
Thanks for your help.
 
Yvan Hess
 
<edoc:EncryptionBlock xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" id="Revision-1-Encryption-1">
 
   <xenc:EncryptedKey Id="Revision-1-Encryption-1-EncryptedKey-1">
      <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
      <ds:KeyInfo>
         <ds:KeyName>SphinxTest</ds:KeyName>
      </ds:KeyInfo>
      <xenc:CipherData>
         <xenc:CipherValue>yWyiuB02b2P2p8jqJhE.....</xenc:CipherValue>
      </xenc:CipherData>
      <xenc:CarriedKeyName>Generated-AES-SecretKey</xenc:CarriedKeyName>
   </xenc:EncryptedKey>
  
   <xenc:EncryptedData Id="Revision-1-Encryption-1-EncryptedData-1">
      <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
      <ds:KeyInfo>
         <ds:KeyName>Generated-AES-SecretKey</ds:KeyName>
      </ds:KeyInfo>
      <xenc:CipherData>
         <xenc:CipherReference URI="urn:hypersuite:534177D3-C0A8027601B4E829-57982AC1"/>
      </xenc:CipherData>
   </xenc:EncryptedData>
  
</edoc:EncryptionBlock>
 

Reply via email to