@@ -295,7 +295,7 @@ version(OPENSSL_NO_DEPRECATED) {} else {
295
295
enum BN_FLG_FREE = 0x8000 ; /* used for debuging */
296
296
}
297
297
void BN_set_flags ()(BIGNUM * b, int n) { b.flags |= n; }
298
- int BN_get_flags ()(BIGNUM * b, int n) { return b.flags & n; }
298
+ int BN_get_flags ()(const ( BIGNUM ) * b, int n) { return b.flags & n; }
299
299
300
300
/* get a clone of a BIGNUM with changed flags, for* temporary* use only
301
301
* (the two BIGNUMs cannot not be used in parallel!) */
@@ -410,15 +410,15 @@ auto BN_prime_checks_for_size(T)(T b) {
410
410
/* b >= 100 */ 27 );
411
411
}
412
412
413
- auto BN_num_bytes ()(BIGNUM * a) { return (BN_num_bits(a)+ 7 )/ 8 ; }
413
+ auto BN_num_bytes ()(const ( BIGNUM ) * a) { return (BN_num_bits(a)+ 7 )/ 8 ; }
414
414
415
415
/* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */
416
- auto BN_abs_is_word ()(BIGNUM * a, BN_ULONG w) { return (((a.top == 1 ) && (a.d[0 ] == (w))) ||
416
+ auto BN_abs_is_word ()(const ( BIGNUM ) * a, BN_ULONG w) { return (((a.top == 1 ) && (a.d[0 ] == (w))) ||
417
417
(((w) == 0 ) && (a.top == 0 ))); }
418
- auto BN_is_zero ()(BIGNUM * a) { return (a.top == 0 ); }
419
- auto BN_is_one ()(BIGNUM * a) { return (BN_abs_is_word((a),1 ) && ! a.neg); }
420
- auto BN_is_word ()(BIGNUM * a, BN_ULONG w) { return (BN_abs_is_word((a),(w)) && (! (w) || ! a.neg)); }
421
- auto BN_is_odd ()(BIGNUM * a) { return ((a.top > 0 ) && (a.d[0 ] & 1 )); }
418
+ auto BN_is_zero ()(const ( BIGNUM ) * a) { return (a.top == 0 ); }
419
+ auto BN_is_one ()(const ( BIGNUM ) * a) { return (BN_abs_is_word((a),1 ) && ! a.neg); }
420
+ auto BN_is_word ()(const ( BIGNUM ) * a, BN_ULONG w) { return (BN_abs_is_word((a),(w)) && (! (w) || ! a.neg)); }
421
+ auto BN_is_odd ()(const ( BIGNUM ) * a) { return ((a.top > 0 ) && (a.d[0 ] & 1 )); }
422
422
423
423
auto BN_one ()(BIGNUM * a) { return BN_set_word((a),1 ); }
424
424
auto BN_zero_ex ()(BIGNUM * a) {
@@ -471,11 +471,11 @@ void BN_set_negative(BIGNUM* b, int n);
471
471
* \param a pointer to the BIGNUM object
472
472
* \return 1 if a < 0 and 0 otherwise
473
473
*/
474
- auto BN_is_negative ()(BIGNUM * a) { return a.neg != 0 ; }
474
+ auto BN_is_negative ()(const ( BIGNUM ) * a) { return a.neg != 0 ; }
475
475
476
476
int BN_div (BIGNUM * dv, BIGNUM * rem, const (BIGNUM )* m, const (BIGNUM )* d,
477
477
BN_CTX * ctx);
478
- auto BN_mod ()(BIGNUM * rem,BIGNUM * m,BIGNUM * d,BN_CTX * ctx) { return BN_div(NULL ,(rem),(m),(d),(ctx)); }
478
+ auto BN_mod ()(BIGNUM * rem,const ( BIGNUM ) * m,const ( BIGNUM ) * d,BN_CTX * ctx) { return BN_div(null ,(rem),(m),(d),(ctx)); }
479
479
int BN_nnmod (BIGNUM * r, const (BIGNUM )* m, const (BIGNUM )* d, BN_CTX * ctx);
480
480
int BN_mod_add (BIGNUM * r, const (BIGNUM )* a, const (BIGNUM )* b, const (BIGNUM )* m, BN_CTX * ctx);
481
481
int BN_mod_add_quick (BIGNUM * r, const (BIGNUM )* a, const (BIGNUM )* b, const (BIGNUM )* m);
0 commit comments