BN_GF2m_poly2arr

Convert a GF(2^m) polynomial BIGNUM into a descending exponent index array.

Synopsis

Declared in <openssl/bn.h>

int
BN_GF2m_poly2arr(
    BIGNUM const* a,
    int p[],
    int max);

Return Value

Number of exponents written (excluding -1), or 0 if max is too small / on error.

Parameters

NameDescription
aPolynomial whose set bits become exponents.
pDestination array of size at least max; filled then terminated with -1.
maxCapacity of p including room for the -1 terminator.