BN_mpi2bn

Decode an MPI-format integer (4-byte length prefix plus big-endian content).

Synopsis

Declared in <openssl/bn.h>

BIGNUM*
BN_mpi2bn(
    unsigned char const* s,
    int len,
    BIGNUM* ret);

Return Value

Result BIGNUM, or NULL on error.

Parameters

NameDescription
sMPI-encoded input buffer.
lenNumber of bytes at s.
retDestination BIGNUM to reuse, or NULL to allocate a new one.