[#BN_to_ASN1_INTEGER]
= BN&lowbar;to&lowbar;ASN1&lowbar;INTEGER
:mrdocs:

Convert a BIGNUM to an ASN&period;1 INTEGER (allocating or reusing `ai)&period;`

== Synopsis

Declared in `&lt;openssl&sol;asn1&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:ASN1_INTEGER.adoc[ASN1&lowbar;INTEGER]*
BN&lowbar;to&lowbar;ASN1&lowbar;INTEGER(
    xref:BIGNUM.adoc[BIGNUM] const* bn,
    xref:ASN1_INTEGER.adoc[ASN1&lowbar;INTEGER]* ai);
----

== Return Value

Pointer to the INTEGER result (possibly newly allocated), or NULL on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bn*
| Source big integer (may be negative)&period;
| *ai*
| Existing ASN1&lowbar;INTEGER to reuse, or NULL to allocate&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
