You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org> on 2015/04/13 11:07:12 UTC

[jira] [Updated] (SANTUARIO-410) Method for accessing XML Element for EncryptedData

     [ https://issues.apache.org/jira/browse/SANTUARIO-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh updated SANTUARIO-410:
------------------------------------------
    Component/s: Java

> Method for accessing XML Element for EncryptedData
> --------------------------------------------------
>
>                 Key: SANTUARIO-410
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-410
>             Project: Santuario
>          Issue Type: Improvement
>          Components: Java
>            Reporter: RomanP
>            Assignee: Colm O hEigeartaigh
>            Priority: Minor
>
> There is no easy way to get Element object for EncryptedData. Getting xml element is needed for example for invoking setIdAttribute (when we want to sign this encrypted data).
> In the current version you have to use xpath to retrieve xml element which is not very efficient. It would be better to have a method getElement in EncryptedData which returns correct XML Element. Similar to KeyInfo class or XMLSignature like:
> KeyInfo key=new KeyInfo();
> Element keyInfoElement=key.getElement();
> There is another way to solve this problem. In EncryptedKey there is the following way to get XML Element:
> EncryptedKey encryptedKey=clipper.encryptKey(doc,secretKey.key);
> Element encryptedKeyElement=clipper.martial(encryptedKey);
> so for EncryptedData xml element could be returned by doFinal method like this:
> Element encryptedDataElement=clipper.doFinal(doc,elementToEncrypt.Element);
> Having getElement method for EncryptedData object would simplify a code and make it much faster. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)