summaryrefslogtreecommitdiffstats
path: root/libtommath/tommath_private.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-10-02 15:22:27 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-10-02 15:22:27 (GMT)
commitafc317f97f0177e386ef463d2204be712252ceec (patch)
treeb626ca6f62abaeff0393253fb9dbc4f0c3cfa5f5 /libtommath/tommath_private.h
parent30f7e69b182d1267056ee2628a860891f6555aa3 (diff)
downloadtcl-libtommath.zip
tcl-libtommath.tar.gz
tcl-libtommath.tar.bz2
'const'ify all libtommath functions, will appear in next libtommath version. See: pull request [https://github.com/libtom/libtommath/pull/88|88]libtommath
Diffstat (limited to 'libtommath/tommath_private.h')
-rw-r--r--libtommath/tommath_private.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/libtommath/tommath_private.h b/libtommath/tommath_private.h
index ee39694..087ddcd 100644
--- a/libtommath/tommath_private.h
+++ b/libtommath/tommath_private.h
@@ -55,24 +55,24 @@ extern void XFREE(void *p);
#endif
/* lowlevel functions, do not call! */
-int s_mp_add(mp_int *a, mp_int *b, mp_int *c);
-int s_mp_sub(mp_int *a, mp_int *b, mp_int *c);
+int s_mp_add(const mp_int *a, const mp_int *b, mp_int *c);
+int s_mp_sub(const mp_int *a, const mp_int *b, mp_int *c);
#define s_mp_mul(a, b, c) s_mp_mul_digs(a, b, c, (a)->used + (b)->used + 1)
-int fast_s_mp_mul_digs(mp_int *a, mp_int *b, mp_int *c, int digs);
-int s_mp_mul_digs(mp_int *a, mp_int *b, mp_int *c, int digs);
-int fast_s_mp_mul_high_digs(mp_int *a, mp_int *b, mp_int *c, int digs);
-int s_mp_mul_high_digs(mp_int *a, mp_int *b, mp_int *c, int digs);
-int fast_s_mp_sqr(mp_int *a, mp_int *b);
-int s_mp_sqr(mp_int *a, mp_int *b);
-int mp_karatsuba_mul(mp_int *a, mp_int *b, mp_int *c);
-int mp_toom_mul(mp_int *a, mp_int *b, mp_int *c);
-int mp_karatsuba_sqr(mp_int *a, mp_int *b);
-int mp_toom_sqr(mp_int *a, mp_int *b);
-int fast_mp_invmod(mp_int *a, mp_int *b, mp_int *c);
-int mp_invmod_slow(mp_int *a, mp_int *b, mp_int *c);
-int fast_mp_montgomery_reduce(mp_int *x, mp_int *n, mp_digit rho);
-int mp_exptmod_fast(mp_int *G, mp_int *X, mp_int *P, mp_int *Y, int redmode);
-int s_mp_exptmod(mp_int *G, mp_int *X, mp_int *P, mp_int *Y, int redmode);
+int fast_s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs);
+int s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs);
+int fast_s_mp_mul_high_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs);
+int s_mp_mul_high_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs);
+int fast_s_mp_sqr(const mp_int *a, mp_int *b);
+int s_mp_sqr(const mp_int *a, mp_int *b);
+int mp_karatsuba_mul(const mp_int *a, const mp_int *b, mp_int *c);
+int mp_toom_mul(const mp_int *a, const mp_int *b, mp_int *c);
+int mp_karatsuba_sqr(const mp_int *a, mp_int *b);
+int mp_toom_sqr(const mp_int *a, mp_int *b);
+int fast_mp_invmod(const mp_int *a, const mp_int *b, mp_int *c);
+int mp_invmod_slow(const mp_int *a, const mp_int *b, mp_int *c);
+int fast_mp_montgomery_reduce(mp_int *x, const mp_int *n, mp_digit rho);
+int mp_exptmod_fast(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y, int redmode);
+int s_mp_exptmod(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y, int redmode);
void bn_reverse(unsigned char *s, int len);
extern const char *mp_s_rmap;