<refentry id="xmlsec-xmlenc">
<refmeta>
<refentrytitle>xmlenc.h</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>XMLSEC Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>xmlenc.h</refname><refpurpose>The <ulink url="http://www.w3.org/Encryption/">XML Encrypiton</ulink> 
standard implementation.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>



struct      <link linkend="xmlSecEncCtx">xmlSecEncCtx</link>;
<link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> <link linkend="xmlSecEncCtxCreate">xmlSecEncCtxCreate</link>          (<link linkend="xmlSecKeysMngrPtr">xmlSecKeysMngrPtr</link> keysMngr);
void        <link linkend="xmlSecEncCtxDestroy">xmlSecEncCtxDestroy</link>             (<link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> ctx);
int         <link linkend="xmlSecEncryptMemory">xmlSecEncryptMemory</link>             (<link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> ctx,
                                             void *context,
                                             <link linkend="xmlSecKeyPtr">xmlSecKeyPtr</link> key,
                                             <link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             unsigned char *buf,
                                             <link linkend="size-t">size_t</link> size,
                                             <link linkend="xmlSecEncResultPtr">xmlSecEncResultPtr</link> *result);
int         <link linkend="xmlSecEncryptUri">xmlSecEncryptUri</link>                (<link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> ctx,
                                             void *context,
                                             <link linkend="xmlSecKeyPtr">xmlSecKeyPtr</link> key,
                                             <link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             const char *uri,
                                             <link linkend="xmlSecEncResultPtr">xmlSecEncResultPtr</link> *result);
int         <link linkend="xmlSecEncryptXmlNode">xmlSecEncryptXmlNode</link>            (<link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> ctx,
                                             void *context,
                                             <link linkend="xmlSecKeyPtr">xmlSecKeyPtr</link> key,
                                             <link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             <link linkend="xmlNodePtr">xmlNodePtr</link> src,
                                             <link linkend="xmlSecEncResultPtr">xmlSecEncResultPtr</link> *result);
int         <link linkend="xmlSecDecrypt">xmlSecDecrypt</link>                   (<link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> ctx,
                                             void *context,
                                             <link linkend="xmlSecKeyPtr">xmlSecKeyPtr</link> key,
                                             <link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             <link linkend="xmlSecEncResultPtr">xmlSecEncResultPtr</link> *result);
struct      <link linkend="xmlSecEncResult">xmlSecEncResult</link>;
<link linkend="xmlSecEncResultPtr">xmlSecEncResultPtr</link> <link linkend="xmlSecEncResultCreate">xmlSecEncResultCreate</link>    (<link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> ctx,
                                             void *context,
                                             int encrypt,
                                             <link linkend="xmlNodePtr">xmlNodePtr</link> node);
void        <link linkend="xmlSecEncResultDestroy">xmlSecEncResultDestroy</link>          (<link linkend="xmlSecEncResultPtr">xmlSecEncResultPtr</link> result);
void        <link linkend="xmlSecEncResultDebugDump">xmlSecEncResultDebugDump</link>        (<link linkend="xmlSecEncResultPtr">xmlSecEncResultPtr</link> result,
                                             <link linkend="FILE-CAPS">FILE</link> *output);
<link linkend="xmlNodePtr">xmlNodePtr</link>  <link linkend="xmlSecEncDataCreate">xmlSecEncDataCreate</link>             (const <link linkend="xmlChar">xmlChar</link> *id,
                                             const <link linkend="xmlChar">xmlChar</link> *type,
                                             const <link linkend="xmlChar">xmlChar</link> *mimeType,
                                             const <link linkend="xmlChar">xmlChar</link> *encoding);
void        <link linkend="xmlSecEncDataDestroy">xmlSecEncDataDestroy</link>            (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode);
<link linkend="xmlNodePtr">xmlNodePtr</link>  <link linkend="xmlSecEncDataAddEncMethod">xmlSecEncDataAddEncMethod</link>       (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             <link linkend="xmlSecTransformId">xmlSecTransformId</link> encMethod);
<link linkend="xmlNodePtr">xmlNodePtr</link>  <link linkend="xmlSecEncDataAddKeyInfo">xmlSecEncDataAddKeyInfo</link>         (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode);
<link linkend="xmlNodePtr">xmlNodePtr</link>  <link linkend="xmlSecEncDataAddEncProperties">xmlSecEncDataAddEncProperties</link>   (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             const <link linkend="xmlChar">xmlChar</link> *id);
<link linkend="xmlNodePtr">xmlNodePtr</link>  <link linkend="xmlSecEncDataAddEncProperty">xmlSecEncDataAddEncProperty</link>     (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             const <link linkend="xmlChar">xmlChar</link> *id,
                                             const <link linkend="xmlChar">xmlChar</link> *target);
<link linkend="xmlNodePtr">xmlNodePtr</link>  <link linkend="xmlSecEncDataAddCipherValue">xmlSecEncDataAddCipherValue</link>     (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode);
<link linkend="xmlNodePtr">xmlNodePtr</link>  <link linkend="xmlSecEncDataAddCipherReference">xmlSecEncDataAddCipherReference</link> (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             const <link linkend="xmlChar">xmlChar</link> *uri);
<link linkend="xmlNodePtr">xmlNodePtr</link>  <link linkend="xmlSecCipherReferenceAddTransform">xmlSecCipherReferenceAddTransform</link>
                                            (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             <link linkend="xmlSecTransformId">xmlSecTransformId</link> transform);
</synopsis>
</refsynopsisdiv>





<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="xmlSecEncCtx">struct xmlSecEncCtx</title>
<programlisting>struct xmlSecEncCtx {
    xmlSecKeysMngrPtr		keysMngr;
    xmlSecTransformId		encryptionMethod;
    int				ignoreType;
    time_t			certsVerificationTime;
};
</programlisting>
<para>
XML Encrypiton context.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row>
<entry><link linkend="xmlSecKeysMngrPtr">xmlSecKeysMngrPtr</link> <structfield>keysMngr</structfield></entry>
<entry> the pointer to keys manager <link linkend="xmlSecKeysMngr">xmlSecKeysMngr</link>.
</entry>
</row>
<row>
<entry><link linkend="xmlSecTransformId">xmlSecTransformId</link> <structfield>encryptionMethod</structfield></entry>
<entry> the default encryption algorithm id.
</entry>
</row>
<row>
<entry>int <structfield>ignoreType</structfield></entry>
<entry>	the flag to ignore Type attribute in the &lt;enc:EncryptedData&gt; 
	node
</entry>
</row>
<row>
<entry><link linkend="time-t">time_t</link> <structfield>certsVerificationTime</structfield></entry>
<entry>

</entry>
</row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncCtxCreate">xmlSecEncCtxCreate ()</title>
<programlisting><link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> xmlSecEncCtxCreate          (<link linkend="xmlSecKeysMngrPtr">xmlSecKeysMngrPtr</link> keysMngr);</programlisting>
<para>
Creates new encryption context.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>keysMngr</parameter>&nbsp;:</entry>
<entry> the pointer to <link linkend="xmlSecKeysMngr">xmlSecKeysMngr</link> structure.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>newly allocated <link linkend="xmlSecEncCtx">xmlSecEncCtx</link> structure or NULL if an error occurs.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncCtxDestroy">xmlSecEncCtxDestroy ()</title>
<programlisting>void        xmlSecEncCtxDestroy             (<link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> ctx);</programlisting>
<para>
Destroys the <link linkend="xmlSecEncCtx">xmlSecEncCtx</link> structure.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>ctx</parameter>&nbsp;:</entry>
<entry> the pointer to <link linkend="xmlSecEncCtx">xmlSecEncCtx</link> structure.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncryptMemory">xmlSecEncryptMemory ()</title>
<programlisting>int         xmlSecEncryptMemory             (<link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> ctx,
                                             void *context,
                                             <link linkend="xmlSecKeyPtr">xmlSecKeyPtr</link> key,
                                             <link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             unsigned char *buf,
                                             <link linkend="size-t">size_t</link> size,
                                             <link linkend="xmlSecEncResultPtr">xmlSecEncResultPtr</link> *result);</programlisting>
<para>
Encrypts binary data from the <parameter>buf</parameter> according to the template in the
&lt;enc:EncryptionData&gt; node. After the encrytion the result XML is in 
the <parameter>encNode</parameter> node.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>ctx</parameter>&nbsp;:</entry>
<entry> the pointer to <link linkend="xmlSecEncCtx">xmlSecEncCtx</link> structure.
</entry></row>
<row><entry align="right"><parameter>context</parameter>&nbsp;:</entry>
<entry> the pointer to application specific data that will be 
    passed to all callback functions.
</entry></row>
<row><entry align="right"><parameter>key</parameter>&nbsp;:</entry>
<entry> the key to use (if NULL then the key specified in &lt;dsig:KeyInfo&gt;
    will be used).   
</entry></row>
<row><entry align="right"><parameter>encNode</parameter>&nbsp;:</entry>
<entry> the pointer to encryption template (&lt;enc:EncryptionData&gt; node).
</entry></row>
<row><entry align="right"><parameter>buf</parameter>&nbsp;:</entry>
<entry> the pointer to data to encrypt.
</entry></row>
<row><entry align="right"><parameter>size</parameter>&nbsp;:</entry>
<entry> the size of the data in <parameter>buf</parameter>.
</entry></row>
<row><entry align="right"><parameter>result</parameter>&nbsp;:</entry>
<entry> the pointer where to store encryption results.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>0 on success or a negative value otherwise.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncryptUri">xmlSecEncryptUri ()</title>
<programlisting>int         xmlSecEncryptUri                (<link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> ctx,
                                             void *context,
                                             <link linkend="xmlSecKeyPtr">xmlSecKeyPtr</link> key,
                                             <link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             const char *uri,
                                             <link linkend="xmlSecEncResultPtr">xmlSecEncResultPtr</link> *result);</programlisting>
<para>
Encrypts binary data from the <parameter>uri</parameter> according to the template in the
&lt;enc:EncryptionData&gt; node. After the encrytion the result XML is in 
the <parameter>encNode</parameter> node.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>ctx</parameter>&nbsp;:</entry>
<entry> the pointer to <link linkend="xmlSecEncCtx">xmlSecEncCtx</link> structure.
</entry></row>
<row><entry align="right"><parameter>context</parameter>&nbsp;:</entry>
<entry> the pointer to application specific data that will be 
    passed to all callback functions.
</entry></row>
<row><entry align="right"><parameter>key</parameter>&nbsp;:</entry>
<entry> the key to use (if NULL then the key specified in &lt;dsig:KeyInfo&gt;
    will be used).   
</entry></row>
<row><entry align="right"><parameter>encNode</parameter>&nbsp;:</entry>
<entry> the pointer to encryption template (&lt;enc:EncryptionData&gt; node).
</entry></row>
<row><entry align="right"><parameter>uri</parameter>&nbsp;:</entry>
<entry> the URI to data to encrypt.
</entry></row>
<row><entry align="right"><parameter>result</parameter>&nbsp;:</entry>
<entry> the pointer where to store encryption results.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>0 on success or a negative value otherwise.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncryptXmlNode">xmlSecEncryptXmlNode ()</title>
<programlisting>int         xmlSecEncryptXmlNode            (<link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> ctx,
                                             void *context,
                                             <link linkend="xmlSecKeyPtr">xmlSecKeyPtr</link> key,
                                             <link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             <link linkend="xmlNodePtr">xmlNodePtr</link> src,
                                             <link linkend="xmlSecEncResultPtr">xmlSecEncResultPtr</link> *result);</programlisting>
<para>
Encrypts XML data from the <parameter>encNode</parameter> according to the template in the
&lt;enc:EncryptionData&gt; node. After the encrytion the result XML is in 
the <parameter>src</parameter> node.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>ctx</parameter>&nbsp;:</entry>
<entry> the pointer to <link linkend="xmlSecEncCtx">xmlSecEncCtx</link> structure.
</entry></row>
<row><entry align="right"><parameter>context</parameter>&nbsp;:</entry>
<entry> the pointer to application specific data that will be 
    passed to all callback functions.
</entry></row>
<row><entry align="right"><parameter>key</parameter>&nbsp;:</entry>
<entry> the key to use (if NULL then the key specified in &lt;dsig:KeyInfo&gt;
    will be used).   
</entry></row>
<row><entry align="right"><parameter>encNode</parameter>&nbsp;:</entry>
<entry> the pointer to encryption template (&lt;enc:EncryptionData&gt; node).
</entry></row>
<row><entry align="right"><parameter>src</parameter>&nbsp;:</entry>
<entry> the pointer to XML node to encrypt.
</entry></row>
<row><entry align="right"><parameter>result</parameter>&nbsp;:</entry>
<entry> the pointer where to store encryption results.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>0 on success or a negative value otherwise.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecDecrypt">xmlSecDecrypt ()</title>
<programlisting>int         xmlSecDecrypt                   (<link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> ctx,
                                             void *context,
                                             <link linkend="xmlSecKeyPtr">xmlSecKeyPtr</link> key,
                                             <link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             <link linkend="xmlSecEncResultPtr">xmlSecEncResultPtr</link> *result);</programlisting>
<para>
Decrypts data from the &lt;enc:EncryptionData&gt; node.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>ctx</parameter>&nbsp;:</entry>
<entry> the pointer to <link linkend="xmlSecEncCtx">xmlSecEncCtx</link> structure.
</entry></row>
<row><entry align="right"><parameter>context</parameter>&nbsp;:</entry>
<entry> the pointer to application specific data that will be 
    passed to all callback functions.
</entry></row>
<row><entry align="right"><parameter>key</parameter>&nbsp;:</entry>
<entry> the key to use (if NULL then the key specified in &lt;dsig:KeyInfo&gt;
    will be used).   
</entry></row>
<row><entry align="right"><parameter>encNode</parameter>&nbsp;:</entry>
<entry> the pointer to encryption template (&lt;enc:EncryptionData&gt; node).
</entry></row>
<row><entry align="right"><parameter>result</parameter>&nbsp;:</entry>
<entry> the pointer where to store encryption results.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>0 on success or a negative value otherwise.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncResult">struct xmlSecEncResult</title>
<programlisting>struct xmlSecEncResult {
    xmlSecEncCtxPtr		ctx;
    void			*context;
    xmlNodePtr			self;
    int				encrypt;
    xmlChar			*id;
    xmlChar			*type;
    xmlChar			*mimeType;
    xmlChar			*encoding;
    xmlSecTransformId		encryptionMethod;
    xmlSecKeyPtr		key;
    xmlBufferPtr		buffer;
    int				replaced;
};
</programlisting>
<para>
The XML Encrypiton results.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row>
<entry><link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> <structfield>ctx</structfield></entry>
<entry> the pointer to <link linkend="xmlSecEncCtx">xmlSecEncCtx</link> structure.
</entry>
</row>
<row>
<entry>void *<structfield>context</structfield></entry>
<entry> the pointer to application specific data.
</entry>
</row>
<row>
<entry><link linkend="xmlNodePtr">xmlNodePtr</link> <structfield>self</structfield></entry>
<entry> the pointer to  &lt;enc:EncryptedData&gt; node.
</entry>
</row>
<row>
<entry>int <structfield>encrypt</structfield></entry>
<entry> the encrypt/decrypt flag.
</entry>
</row>
<row>
<entry><link linkend="xmlChar">xmlChar</link> *<structfield>id</structfield></entry>
<entry> the Id attribute of the  &lt;enc:EncryptedData&gt; node.
</entry>
</row>
<row>
<entry><link linkend="xmlChar">xmlChar</link> *<structfield>type</structfield></entry>
<entry> the Type attribute of the  &lt;enc:EncryptedData&gt; node.
</entry>
</row>
<row>
<entry><link linkend="xmlChar">xmlChar</link> *<structfield>mimeType</structfield></entry>
<entry> the MimeType attribute of the  &lt;enc:EncryptedData&gt; node.
</entry>
</row>
<row>
<entry><link linkend="xmlChar">xmlChar</link> *<structfield>encoding</structfield></entry>
<entry> the Encoding attribute of the  &lt;enc:EncryptedData&gt; node.
</entry>
</row>
<row>
<entry><link linkend="xmlSecTransformId">xmlSecTransformId</link> <structfield>encryptionMethod</structfield></entry>
<entry> the used encryption algorithm id.
</entry>
</row>
<row>
<entry><link linkend="xmlSecKeyPtr">xmlSecKeyPtr</link> <structfield>key</structfield></entry>
<entry> the used encryption key.
</entry>
</row>
<row>
<entry><link linkend="xmlBufferPtr">xmlBufferPtr</link> <structfield>buffer</structfield></entry>
<entry> the decrypted data.
</entry>
</row>
<row>
<entry>int <structfield>replaced</structfield></entry>
<entry> if set then the decrypted data were put back into the original document.
</entry>
</row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncResultCreate">xmlSecEncResultCreate ()</title>
<programlisting><link linkend="xmlSecEncResultPtr">xmlSecEncResultPtr</link> xmlSecEncResultCreate    (<link linkend="xmlSecEncCtxPtr">xmlSecEncCtxPtr</link> ctx,
                                             void *context,
                                             int encrypt,
                                             <link linkend="xmlNodePtr">xmlNodePtr</link> node);</programlisting>
<para>
Creates new <link linkend="xmlSecEncResult">xmlSecEncResult</link> structure.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>ctx</parameter>&nbsp;:</entry>
<entry> the pointer to <link linkend="xmlSecEncCtx">xmlSecEncCtx</link> structure.
</entry></row>
<row><entry align="right"><parameter>context</parameter>&nbsp;:</entry>
<entry> the pointer to application specific data that will be 
    passed to all callback functions.
</entry></row>
<row><entry align="right"><parameter>encrypt</parameter>&nbsp;:</entry>
<entry> the encrypt/decrypt flag.
</entry></row>
<row><entry align="right"><parameter>node</parameter>&nbsp;:</entry>
<entry> the pointer to &lt;enc:EncryptedData&gt; node.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>newly created <link linkend="xmlSecEncResult">xmlSecEncResult</link> structure or NULL 
if an error occurs.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncResultDestroy">xmlSecEncResultDestroy ()</title>
<programlisting>void        xmlSecEncResultDestroy          (<link linkend="xmlSecEncResultPtr">xmlSecEncResultPtr</link> result);</programlisting>
<para>
Destroys <link linkend="xmlSecEncResult">xmlSecEncResult</link> structure <parameter>result</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>result</parameter>&nbsp;:</entry>
<entry> the pointer to <link linkend="xmlSecEncResult">xmlSecEncResult</link> structure.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncResultDebugDump">xmlSecEncResultDebugDump ()</title>
<programlisting>void        xmlSecEncResultDebugDump        (<link linkend="xmlSecEncResultPtr">xmlSecEncResultPtr</link> result,
                                             <link linkend="FILE-CAPS">FILE</link> *output);</programlisting>
<para>
Prints the <link linkend="xmlSecEncResult">xmlSecEncResult</link> structure <parameter>result</parameter> to file <parameter>output</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>result</parameter>&nbsp;:</entry>
<entry> the pointer to <link linkend="xmlSecEncResult">xmlSecEncResult</link> structure.
</entry></row>
<row><entry align="right"><parameter>output</parameter>&nbsp;:</entry>
<entry> the pointer to destination FILE.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncDataCreate">xmlSecEncDataCreate ()</title>
<programlisting><link linkend="xmlNodePtr">xmlNodePtr</link>  xmlSecEncDataCreate             (const <link linkend="xmlChar">xmlChar</link> *id,
                                             const <link linkend="xmlChar">xmlChar</link> *type,
                                             const <link linkend="xmlChar">xmlChar</link> *mimeType,
                                             const <link linkend="xmlChar">xmlChar</link> *encoding);</programlisting>
<para>
Creates new &lt;enc:EncryptedData&gt; node for encryption template.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>id</parameter>&nbsp;:</entry>
<entry> the Id attribute (optional).
</entry></row>
<row><entry align="right"><parameter>type</parameter>&nbsp;:</entry>
<entry> the Type attribute (optional)
</entry></row>
<row><entry align="right"><parameter>mimeType</parameter>&nbsp;:</entry>
<entry> the MimeType attribute (optional)
</entry></row>
<row><entry align="right"><parameter>encoding</parameter>&nbsp;:</entry>
<entry> the Encoding attribute (optional)
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the pointer newly created  &lt;enc:EncryptedData&gt; node or NULL 
if an error occurs.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncDataDestroy">xmlSecEncDataDestroy ()</title>
<programlisting>void        xmlSecEncDataDestroy            (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode);</programlisting>
<para>
Destroys the &lt;enc:EncryptedData&gt; node <parameter>encNode</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>encNode</parameter>&nbsp;:</entry>
<entry> the pointer to &lt;enc:EncryptedData&gt; node.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncDataAddEncMethod">xmlSecEncDataAddEncMethod ()</title>
<programlisting><link linkend="xmlNodePtr">xmlNodePtr</link>  xmlSecEncDataAddEncMethod       (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             <link linkend="xmlSecTransformId">xmlSecTransformId</link> encMethod);</programlisting>
<para>
Adds &lt;enc:EncryptionMethod&gt; node with specified encryption 
algorithm (<parameter>encMethodId</parameter>) to the  &lt;enc:EncryptedData&gt; node <parameter>encNode</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>encNode</parameter>&nbsp;:</entry>
<entry> the pointer to &lt;enc:EncryptedData&gt; node.
</entry></row>
<row><entry align="right"><parameter>encMethod</parameter>&nbsp;:</entry>
<entry> the encryption method id.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the pointer to newly created &lt;enc:EncryptionMethod&gt; node or 
NULL if an error occurs.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncDataAddKeyInfo">xmlSecEncDataAddKeyInfo ()</title>
<programlisting><link linkend="xmlNodePtr">xmlNodePtr</link>  xmlSecEncDataAddKeyInfo         (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode);</programlisting>
<para>
Adds &lt;dsig:KeyInfo&gt; to the  &lt;enc:EncryptedData&gt; node <parameter>encNode</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>encNode</parameter>&nbsp;:</entry>
<entry> the pointer to &lt;enc:EncryptedData&gt; node.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the pointer to newly created &lt;dsig:KeyInfo&gt; node or 
NULL if an error occurs.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncDataAddEncProperties">xmlSecEncDataAddEncProperties ()</title>
<programlisting><link linkend="xmlNodePtr">xmlNodePtr</link>  xmlSecEncDataAddEncProperties   (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             const <link linkend="xmlChar">xmlChar</link> *id);</programlisting>
<para>
Adds &lt;enc:EncryptionProperties&gt; node to the &lt;enc:EncryptedData&gt; 
node <parameter>encNode</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>encNode</parameter>&nbsp;:</entry>
<entry> the pointer to &lt;enc:EncryptedData&gt; node.
</entry></row>
<row><entry align="right"><parameter>id</parameter>&nbsp;:</entry>
<entry> the Id attribute (optional).
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the pointer to newly created &lt;enc:EncryptionProperties&gt; node or 
NULL if an error occurs.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncDataAddEncProperty">xmlSecEncDataAddEncProperty ()</title>
<programlisting><link linkend="xmlNodePtr">xmlNodePtr</link>  xmlSecEncDataAddEncProperty     (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             const <link linkend="xmlChar">xmlChar</link> *id,
                                             const <link linkend="xmlChar">xmlChar</link> *target);</programlisting>
<para>
Adds &lt;enc:EncryptionProperty&gt; node (and the parent 
&lt;enc:EncryptionProperties&gt; node if required) to the 
&lt;enc:EncryptedData&gt; node <parameter>encNode</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>encNode</parameter>&nbsp;:</entry>
<entry> the pointer to &lt;enc:EncryptedData&gt; node.
</entry></row>
<row><entry align="right"><parameter>id</parameter>&nbsp;:</entry>
<entry> the Id attribute (optional).
</entry></row>
<row><entry align="right"><parameter>target</parameter>&nbsp;:</entry>
<entry> the Target attribute (optional).
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the pointer to newly created &lt;enc:EncryptionProperty&gt; node or 
NULL if an error occurs.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncDataAddCipherValue">xmlSecEncDataAddCipherValue ()</title>
<programlisting><link linkend="xmlNodePtr">xmlNodePtr</link>  xmlSecEncDataAddCipherValue     (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode);</programlisting>
<para>
Adds &lt;enc:CipherValue&gt; to the &lt;enc:EncryptedData&gt; node <parameter>encNode</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>encNode</parameter>&nbsp;:</entry>
<entry> the pointer to &lt;enc:EncryptedData&gt; node.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the pointer to newly created &lt;enc:CipherValue&gt; node or 
NULL if an error occurs.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecEncDataAddCipherReference">xmlSecEncDataAddCipherReference ()</title>
<programlisting><link linkend="xmlNodePtr">xmlNodePtr</link>  xmlSecEncDataAddCipherReference (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             const <link linkend="xmlChar">xmlChar</link> *uri);</programlisting>
<para>
Adds &lt;enc:CipherReference&gt; node with specified URI attribute <parameter>uri</parameter>
to the &lt;enc:EncryptedData&gt; node <parameter>encNode</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>encNode</parameter>&nbsp;:</entry>
<entry> the pointer to &lt;enc:EncryptedData&gt; node.
</entry></row>
<row><entry align="right"><parameter>uri</parameter>&nbsp;:</entry>
<entry> the URI attribute (may be NULL).
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the pointer to newly created &lt;enc:CipherReference&gt; node or 
NULL if an error occurs.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="xmlSecCipherReferenceAddTransform">xmlSecCipherReferenceAddTransform ()</title>
<programlisting><link linkend="xmlNodePtr">xmlNodePtr</link>  xmlSecCipherReferenceAddTransform
                                            (<link linkend="xmlNodePtr">xmlNodePtr</link> encNode,
                                             <link linkend="xmlSecTransformId">xmlSecTransformId</link> transform);</programlisting>
<para>
Adds &lt;dsig:Transform&gt; node (and the parent &lt;dsig:Transforms&gt; node)
with specified transform methods <parameter>transform</parameter> to the &lt;enc:CipherReference&gt;
child node of the &lt;enc:EncryptedData&gt; node <parameter>encNode</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>encNode</parameter>&nbsp;:</entry>
<entry> the pointer to &lt;enc:EncryptedData&gt; node.
</entry></row>
<row><entry align="right"><parameter>transform</parameter>&nbsp;:</entry>
<entry> the transform id.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the pointer to newly created &lt;dsig:Transform&gt; node or 
NULL if an error occurs.
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>




</refentry>
