[#BN_GF2m_poly2arr]
= BN&lowbar;GF2m&lowbar;poly2arr
:mrdocs:

Convert a GF(2&circ;m) polynomial BIGNUM into a descending exponent index array&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
BN&lowbar;GF2m&lowbar;poly2arr(
    xref:BIGNUM.adoc[BIGNUM] const* a,
    int p[],
    int max);
----

== Return Value

Number of exponents written (excluding &hyphen;1), or 0 if `max` is too small &sol; on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *a*
| Polynomial whose set bits become exponents&period;
| *p*
| Destination array of size at least `max&semi;` filled then terminated with &hyphen;1&period;
| *max*
| Capacity of `p` including room for the &hyphen;1 terminator&period;
|===


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