<refentry id="xmlsec-openssl-bn">
<refmeta>
<refentrytitle role="top_of_page" id="xmlsec-openssl-bn.top_of_page">bn</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>XMLSEC-OPENSSL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>bn</refname>
<refpurpose>Big numbers helper functions.</refpurpose>
</refnamediv>

<refsynopsisdiv id="xmlsec-openssl-bn.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
<link linkend="BIGNUM--CAPS">BIGNUM</link>*             <link linkend="xmlSecOpenSSLNodeGetBNValue">xmlSecOpenSSLNodeGetBNValue</link>         (const <link linkend="xmlNode">xmlNodePtr</link> cur,
                                                         <link linkend="BIGNUM--CAPS">BIGNUM</link> **a);
<link linkend="int">int</link>                 <link linkend="xmlSecOpenSSLNodeSetBNValue">xmlSecOpenSSLNodeSetBNValue</link>         (<link linkend="xmlNode">xmlNodePtr</link> cur,
                                                         const <link linkend="BIGNUM--CAPS">BIGNUM</link> *a,
                                                         <link linkend="int">int</link> addLineBreaks);
</synopsis>
</refsynopsisdiv>









<refsect1 id="xmlsec-openssl-bn.description" role="desc">
<title role="desc.title">Description</title>
<para>
Big numbers helper functions.
</para>
</refsect1>

<refsect1 id="xmlsec-openssl-bn.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="xmlSecOpenSSLNodeGetBNValue" role="function">
<title>xmlSecOpenSSLNodeGetBNValue ()</title>
<indexterm zone="xmlSecOpenSSLNodeGetBNValue"><primary sortas="xmlSecOpenSSLNodeGetBNValue">xmlSecOpenSSLNodeGetBNValue</primary></indexterm><programlisting><link linkend="BIGNUM--CAPS">BIGNUM</link>*             xmlSecOpenSSLNodeGetBNValue         (const <link linkend="xmlNode">xmlNodePtr</link> cur,
                                                         <link linkend="BIGNUM--CAPS">BIGNUM</link> **a);</programlisting>
<para>
Converts the node content from CryptoBinary format
(http://www.w3.org/TR/xmldsig-core/<link linkend="sec-CryptoBinary"><type>sec-CryptoBinary</type></link>)
to a BIGNUM. If no BIGNUM buffer provided then a new
BIGNUM is created (caller is responsible for freeing it).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>cur</parameter>&#160;:</term>
<listitem><simpara> the poitner to an XML node.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>a</parameter>&#160;:</term>
<listitem><simpara> the BIGNUM buffer.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a pointer to BIGNUM produced from CryptoBinary string
or NULL if an error occurs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecOpenSSLNodeSetBNValue" role="function">
<title>xmlSecOpenSSLNodeSetBNValue ()</title>
<indexterm zone="xmlSecOpenSSLNodeSetBNValue"><primary sortas="xmlSecOpenSSLNodeSetBNValue">xmlSecOpenSSLNodeSetBNValue</primary></indexterm><programlisting><link linkend="int">int</link>                 xmlSecOpenSSLNodeSetBNValue         (<link linkend="xmlNode">xmlNodePtr</link> cur,
                                                         const <link linkend="BIGNUM--CAPS">BIGNUM</link> *a,
                                                         <link linkend="int">int</link> addLineBreaks);</programlisting>
<para>
Converts BIGNUM to CryptoBinary string
(http://www.w3.org/TR/xmldsig-core/<link linkend="sec-CryptoBinary"><type>sec-CryptoBinary</type></link>)
and sets it as the content of the given node. If the
addLineBreaks is set then line breaks are added
before and after the CryptoBinary string.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>cur</parameter>&#160;:</term>
<listitem><simpara> the pointer to an XML node.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>a</parameter>&#160;:</term>
<listitem><simpara> the BIGNUM.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>addLineBreaks</parameter>&#160;:</term>
<listitem><simpara> if the flag is equal to 1 then
             linebreaks will be added before and after
             new buffer content.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> 0 on success or -1 otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
