Encode a signed BIGNUM as big-endian two's-complement of fixed width.
Declared in <openssl/bn.h>
int
BN_signed_bn2bin(
BIGNUM const* a,
unsigned char* to,
int tolen);
tolen on success, or -1 if a does not fit in tolen bytes.
| Name | Description |
|---|---|
| a | Value to encode (may be negative). |
| to | Destination buffer of tolen bytes. |
| tolen | Fixed output width in bytes. |