diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-09-18 12:53:48 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-09-18 12:53:48 (GMT) |
commit | 64cc2359605a427ced84a960a02e770c9c184be1 (patch) | |
tree | 09e2655da959a6836c1ce84c44656f55b691bdcb /generic | |
parent | a187f65cfd5964971d7ed52f09e18fdbb4bf51cc (diff) | |
download | tcl-64cc2359605a427ced84a960a02e770c9c184be1.zip tcl-64cc2359605a427ced84a960a02e770c9c184be1.tar.gz tcl-64cc2359605a427ced84a960a02e770c9c184be1.tar.bz2 |
Another round of libtommath const'ification. To be submitted to the libtommath folks
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclTomMath.h | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/generic/tclTomMath.h b/generic/tclTomMath.h index 14cf5b6..1f22d6f 100644 --- a/generic/tclTomMath.h +++ b/generic/tclTomMath.h @@ -497,42 +497,42 @@ int mp_mod_d(const mp_int *a, mp_digit b, mp_digit *c); /* d = a + b (mod c) */ /* -int mp_addmod(mp_int *a, mp_int *b, mp_int *c, mp_int *d); +int mp_addmod(const mp_int *a, const mp_int *b, const mp_int *c, mp_int *d); */ /* d = a - b (mod c) */ /* -int mp_submod(mp_int *a, mp_int *b, mp_int *c, mp_int *d); +int mp_submod(const mp_int *a, const mp_int *b, const mp_int *c, mp_int *d); */ /* d = a * b (mod c) */ /* -int mp_mulmod(mp_int *a, mp_int *b, mp_int *c, mp_int *d); +int mp_mulmod(const mp_int *a, const mp_int *b, const mp_int *c, mp_int *d); */ /* c = a * a (mod b) */ /* -int mp_sqrmod(mp_int *a, mp_int *b, mp_int *c); +int mp_sqrmod(const mp_int *a, const mp_int *b, mp_int *c); */ /* c = 1/a (mod b) */ /* -int mp_invmod(mp_int *a, mp_int *b, mp_int *c); +int mp_invmod(const mp_int *a, const mp_int *b, mp_int *c); */ /* c = (a, b) */ /* -int mp_gcd(mp_int *a, mp_int *b, mp_int *c); +int mp_gcd(const mp_int *a, const mp_int *b, mp_int *c); */ /* produces value such that U1*a + U2*b = U3 */ /* -int mp_exteuclid(mp_int *a, mp_int *b, mp_int *U1, mp_int *U2, mp_int *U3); +int mp_exteuclid(const mp_int *a, const mp_int *b, mp_int *U1, mp_int *U2, mp_int *U3); */ /* c = [a, b] or (a*b)/(a, b) */ /* -int mp_lcm(mp_int *a, mp_int *b, mp_int *c); +int mp_lcm(const mp_int *a, const mp_int *b, mp_int *c); */ /* finds one of the b'th root of a, such that |c|**b <= |a| @@ -540,10 +540,10 @@ int mp_lcm(mp_int *a, mp_int *b, mp_int *c); * returns error if a < 0 and b is even */ /* -int mp_n_root(mp_int *a, mp_digit b, mp_int *c); +int mp_n_root(const mp_int *a, mp_digit b, mp_int *c); */ /* -int mp_n_root_ex(mp_int *a, mp_digit b, mp_int *c, int fast); +int mp_n_root_ex(const mp_int *a, mp_digit b, mp_int *c, int fast); */ /* special sqrt algo */ @@ -553,22 +553,22 @@ int mp_sqrt(const mp_int *arg, mp_int *ret); /* special sqrt (mod prime) */ /* -int mp_sqrtmod_prime(mp_int *arg, mp_int *prime, mp_int *ret); +int mp_sqrtmod_prime(const mp_int *arg, const mp_int *prime, mp_int *ret); */ /* is number a square? */ /* -int mp_is_square(mp_int *arg, int *ret); +int mp_is_square(const mp_int *arg, int *ret); */ /* computes the jacobi c = (a | n) (or Legendre if b is prime) */ /* -int mp_jacobi(mp_int *a, mp_int *n, int *c); +int mp_jacobi(const mp_int *a, const mp_int *n, int *c); */ /* used to setup the Barrett reduction for a given modulus b */ /* -int mp_reduce_setup(mp_int *a, mp_int *b); +int mp_reduce_setup(mp_int *a, const mp_int *b); */ /* Barrett Reduction, computes a (mod b) with a precomputed value c @@ -577,74 +577,74 @@ int mp_reduce_setup(mp_int *a, mp_int *b); * compute the reduction as -1 * mp_reduce(mp_abs(a)) [pseudo code]. */ /* -int mp_reduce(mp_int *a, mp_int *b, mp_int *c); +int mp_reduce(mp_int *a, const mp_int *b, mp_int *c); */ /* setups the montgomery reduction */ /* -int mp_montgomery_setup(mp_int *a, mp_digit *mp); +int mp_montgomery_setup(const mp_int *a, mp_digit *mp); */ /* computes a = B**n mod b without division or multiplication useful for * normalizing numbers in a Montgomery system. */ /* -int mp_montgomery_calc_normalization(mp_int *a, mp_int *b); +int mp_montgomery_calc_normalization(mp_int *a, const mp_int *b); */ /* computes x/R == x (mod N) via Montgomery Reduction */ /* -int mp_montgomery_reduce(mp_int *a, mp_int *m, mp_digit mp); +int mp_montgomery_reduce(mp_int *a, const mp_int *m, mp_digit mp); */ /* returns 1 if a is a valid DR modulus */ /* -int mp_dr_is_modulus(mp_int *a); +int mp_dr_is_modulus(const mp_int *a); */ /* sets the value of "d" required for mp_dr_reduce */ /* -void mp_dr_setup(mp_int *a, mp_digit *d); +void mp_dr_setup(const mp_int *a, mp_digit *d); */ /* reduces a modulo b using the Diminished Radix method */ /* -int mp_dr_reduce(mp_int *a, mp_int *b, mp_digit mp); +int mp_dr_reduce(mp_int *a, const mp_int *b, mp_digit mp); */ /* returns true if a can be reduced with mp_reduce_2k */ /* -int mp_reduce_is_2k(mp_int *a); +int mp_reduce_is_2k(const mp_int *a); */ /* determines k value for 2k reduction */ /* -int mp_reduce_2k_setup(mp_int *a, mp_digit *d); +int mp_reduce_2k_setup(const mp_int *a, mp_digit *d); */ /* reduces a modulo b where b is of the form 2**p - k [0 <= a] */ /* -int mp_reduce_2k(mp_int *a, mp_int *n, mp_digit d); +int mp_reduce_2k(mp_int *a, const mp_int *n, mp_digit d); */ /* returns true if a can be reduced with mp_reduce_2k_l */ /* -int mp_reduce_is_2k_l(mp_int *a); +int mp_reduce_is_2k_l(const mp_int *a); */ /* determines k value for 2k reduction */ /* -int mp_reduce_2k_setup_l(mp_int *a, mp_int *d); +int mp_reduce_2k_setup_l(const mp_int *a, mp_int *d); */ /* reduces a modulo b where b is of the form 2**p - k [0 <= a] */ /* -int mp_reduce_2k_l(mp_int *a, mp_int *n, mp_int *d); +int mp_reduce_2k_l(mp_int *a, const mp_int *n, mp_int *d); */ /* d = a**b (mod c) */ /* -int mp_exptmod(mp_int *a, mp_int *b, mp_int *c, mp_int *d); +int mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *c, mp_int *d); */ /* ---> Primes <--- */ |