[#BN_bn2lebinpad]
= BN&lowbar;bn2lebinpad
:mrdocs:

Encode a BIGNUM as fixed&hyphen;length little&hyphen;endian unsigned bytes with zero padding&period;

== Synopsis

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

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

== Return Value

`tolen` on success, or &hyphen;1 if `tolen` is too small or on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *a*
| Value to encode (absolute value&semi; sign is ignored)&period;
| *to*
| Destination buffer of `tolen` bytes&period;
| *tolen*
| Required output length&semi; must be large enough for `a&period;`
|===


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