提交 0d6f9c71 编写于 作者: B Ben Laurie

Constification.

上级 640b86cb
...@@ -416,8 +416,8 @@ BIGNUM *BN_CTX_get(BN_CTX *ctx); ...@@ -416,8 +416,8 @@ BIGNUM *BN_CTX_get(BN_CTX *ctx);
void BN_CTX_end(BN_CTX *ctx); void BN_CTX_end(BN_CTX *ctx);
int BN_rand(BIGNUM *rnd, int bits, int top,int bottom); int BN_rand(BIGNUM *rnd, int bits, int top,int bottom);
int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom); int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom);
int BN_rand_range(BIGNUM *rnd, BIGNUM *range); int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
int BN_pseudo_rand_range(BIGNUM *rnd, BIGNUM *range); int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
int BN_num_bits(const BIGNUM *a); int BN_num_bits(const BIGNUM *a);
int BN_num_bits_word(BN_ULONG); int BN_num_bits_word(BN_ULONG);
BIGNUM *BN_new(void); BIGNUM *BN_new(void);
......
...@@ -227,7 +227,7 @@ int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom) ...@@ -227,7 +227,7 @@ int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom)
/* random number r: 0 <= r < range */ /* random number r: 0 <= r < range */
static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) static int bn_rand_range(int pseudo, BIGNUM *r, const BIGNUM *range)
{ {
int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand; int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand;
int n; int n;
...@@ -294,12 +294,12 @@ static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) ...@@ -294,12 +294,12 @@ static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range)
} }
int BN_rand_range(BIGNUM *r, BIGNUM *range) int BN_rand_range(BIGNUM *r, const BIGNUM *range)
{ {
return bn_rand_range(0, r, range); return bn_rand_range(0, r, range);
} }
int BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range) int BN_pseudo_rand_range(BIGNUM *r, const BIGNUM *range)
{ {
return bn_rand_range(1, r, range); return bn_rand_range(1, r, range);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册