Encode a BIGNUM as fixed-length little-endian unsigned bytes with zero padding.
Declared in <openssl/bn.h>
int
BN_bn2lebinpad(
BIGNUM const* a,
unsigned char* to,
int tolen);
tolen on success, or -1 if tolen is too small or on error.
| Name | Description |
|---|---|
| a | Value to encode (absolute value; sign is ignored). |
| to | Destination buffer of tolen bytes. |
| tolen | Required output length; must be large enough for a. |