<refentry id="xmlsec-nss-bignum">
<refmeta>
<refentrytitle role="top_of_page" id="xmlsec-nss-bignum.top_of_page">bignum</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>XMLSEC-NSS Library</refmiscinfo>
</refmeta>

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

<refsynopsisdiv id="xmlsec-nss-bignum.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
<link linkend="SECItem">SECItem</link>*            <link linkend="xmlSecNssNodeGetBigNumValue">xmlSecNssNodeGetBigNumValue</link>         (<link linkend="PRArenaPool">PRArenaPool</link> *arena,
                                                         const <link linkend="xmlNode">xmlNodePtr</link> cur,
                                                         <link linkend="SECItem">SECItem</link> *a);
<link linkend="int">int</link>                 <link linkend="xmlSecNssNodeSetBigNumValue">xmlSecNssNodeSetBigNumValue</link>         (<link linkend="xmlNode">xmlNodePtr</link> cur,
                                                         const <link linkend="SECItem">SECItem</link> *a,
                                                         <link linkend="int">int</link> addLineBreaks);
</synopsis>
</refsynopsisdiv>









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

<refsect1 id="xmlsec-nss-bignum.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="xmlSecNssNodeGetBigNumValue" role="function">
<title>xmlSecNssNodeGetBigNumValue ()</title>
<indexterm zone="xmlSecNssNodeGetBigNumValue"><primary sortas="xmlSecNssNodeGetBigNumValue">xmlSecNssNodeGetBigNumValue</primary></indexterm><programlisting><link linkend="SECItem">SECItem</link>*            xmlSecNssNodeGetBigNumValue         (<link linkend="PRArenaPool">PRArenaPool</link> *arena,
                                                         const <link linkend="xmlNode">xmlNodePtr</link> cur,
                                                         <link linkend="SECItem">SECItem</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 SECItem. If no SECItem object provided then a new
one is created (caller is responsible for freeing it).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>arena</parameter>&#160;:</term>
<listitem><simpara> the arena from which to allocate memory
</simpara></listitem></varlistentry>
<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> a SECItem object to hold the BigNum value
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a pointer to SECItem produced from CryptoBinary string
or NULL if an error occurs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="xmlSecNssNodeSetBigNumValue" role="function">
<title>xmlSecNssNodeSetBigNumValue ()</title>
<indexterm zone="xmlSecNssNodeSetBigNumValue"><primary sortas="xmlSecNssNodeSetBigNumValue">xmlSecNssNodeSetBigNumValue</primary></indexterm><programlisting><link linkend="int">int</link>                 xmlSecNssNodeSetBigNumValue         (<link linkend="xmlNode">xmlNodePtr</link> cur,
                                                         const <link linkend="SECItem">SECItem</link> *a,
                                                         <link linkend="int">int</link> addLineBreaks);</programlisting>
<para>
Converts SECItem 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> a SECItem containing the BigNum value.
</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>
