BN_native2bn

Decode a native-endian unsigned byte string into a BIGNUM.

Synopsis

Declared in <openssl/bn.h>

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

Return Value

Result BIGNUM (same as ret when non-NULL), or NULL on error.

Parameters

NameDescription
sInput bytes in host endianness.
lenNumber of bytes at s.
retOptional existing BIGNUM to reuse, or NULL to allocate.