summaryrefslogtreecommitdiffstats
path: root/libtommath/tommath.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-09-18 14:38:26 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-09-18 14:38:26 (GMT)
commitf75f76c9d479632f92d722036fdb45311338021f (patch)
tree10f652d15b7acb570ecce58ddcc42c714e6f39ce /libtommath/tommath.h
parentf5ea63343e4245c7b8e5a0872e65c867e5e9d6f2 (diff)
downloadtcl-f75f76c9d479632f92d722036fdb45311338021f.zip
tcl-f75f76c9d479632f92d722036fdb45311338021f.tar.gz
tcl-f75f76c9d479632f92d722036fdb45311338021f.tar.bz2
Finish libtommath's constification work. All done (hopefully). And make sure that C preprocessor directives have the '#' as first character on the line.
Diffstat (limited to 'libtommath/tommath.h')
-rw-r--r--libtommath/tommath.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libtommath/tommath.h b/libtommath/tommath.h
index 513b5b9..dee7ab5 100644
--- a/libtommath/tommath.h
+++ b/libtommath/tommath.h
@@ -464,17 +464,17 @@ int mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *c, mp_int *d);
extern const mp_digit ltm_prime_tab[PRIME_SIZE];
/* result=1 if a is divisible by one of the first PRIME_SIZE primes */
-int mp_prime_is_divisible(mp_int *a, int *result);
+int mp_prime_is_divisible(const mp_int *a, int *result);
/* performs one Fermat test of "a" using base "b".
* Sets result to 0 if composite or 1 if probable prime
*/
-int mp_prime_fermat(mp_int *a, mp_int *b, int *result);
+int mp_prime_fermat(const mp_int *a, const mp_int *b, int *result);
/* performs one Miller-Rabin test of "a" using base "b".
* Sets result to 0 if composite or 1 if probable prime
*/
-int mp_prime_miller_rabin(mp_int *a, mp_int *b, int *result);
+int mp_prime_miller_rabin(const mp_int *a, const mp_int *b, int *result);
/* This gives [for a given bit size] the number of trials required
* such that Miller-Rabin gives a prob of failure lower than 2^-96
@@ -488,7 +488,7 @@ int mp_prime_rabin_miller_trials(int size);
*
* Sets result to 1 if probably prime, 0 otherwise
*/
-int mp_prime_is_prime(mp_int *a, int t, int *result);
+int mp_prime_is_prime(const mp_int *a, int t, int *result);
/* finds the next prime after the number "a" using "t" trials
* of Miller-Rabin.