[#BN_bn2bin]
= BN&lowbar;bn2bin
:mrdocs:

Encode the absolute value of `a` as a minimal big&hyphen;endian unsigned byte string&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
BN&lowbar;bn2bin(
    xref:BIGNUM.adoc[BIGNUM] const* a,
    unsigned char* to);
----

== Return Value

Number of bytes written&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *a*
| Value to encode (sign is ignored)&period;
| *to*
| Destination buffer of at least BN&lowbar;num&lowbar;bytes(`a)` bytes&period;
|===


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