diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-02-01 00:02:05 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-02-02 17:17:38 +0000 |
commit | 85a4807f94580b9b666b3e24fff5752515470b1c (patch) | |
tree | e2e4f5242dcfe694575a1b003badc5b56e14f71e /include | |
parent | 19f7130beb97170b8e825aee1ae9e309520f5f29 (diff) |
New BN functions.
Add new function BN_bn2binpad() which checks the length of the output
buffer and pads the result with zeroes if necessary.
New functions BN_bn2lebinpad() and BN_lebin2bn() which use little endian
format.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/bn.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/openssl/bn.h b/include/openssl/bn.h index 37baef347f..9807b2c684 100644 --- a/include/openssl/bn.h +++ b/include/openssl/bn.h @@ -270,6 +270,9 @@ BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b); void BN_swap(BIGNUM *a, BIGNUM *b); BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret); int BN_bn2bin(const BIGNUM *a, unsigned char *to); +int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen); +BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret); +int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen); BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret); int BN_bn2mpi(const BIGNUM *a, unsigned char *to); int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); |