BN_bin2bn

Convert len big-endian unsigned bytes at s into a BIGNUM.

Synopsis

Declared in <openssl/bn.h>

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

Return Value

Result BIGNUM (possibly newly allocated), or NULL on error.

Parameters

NameDescription
sInput byte string (most significant byte first).
lenNumber of bytes at s.
retExisting BIGNUM to reuse, or NULL to allocate.