mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 14:50:49 +02:00
wolfcrypt/src/integer.c and wolfssl/wolfcrypt/integer.h: constify args to mp_cmp() and mp_cmp_mag().
This commit is contained in:
@@ -1392,10 +1392,10 @@ LBL_ERR:mp_clear(&x);
|
||||
|
||||
|
||||
/* compare magnitude of two ints (unsigned) */
|
||||
int mp_cmp_mag (mp_int * a, mp_int * b)
|
||||
int mp_cmp_mag (const mp_int * a, const mp_int * b)
|
||||
{
|
||||
int n;
|
||||
mp_digit *tmpa, *tmpb;
|
||||
const mp_digit *tmpa, *tmpb;
|
||||
|
||||
/* compare based on # of non-zero digits */
|
||||
if (a->used > b->used) {
|
||||
@@ -1430,7 +1430,7 @@ int mp_cmp_mag (mp_int * a, mp_int * b)
|
||||
|
||||
|
||||
/* compare two ints (signed)*/
|
||||
int mp_cmp (mp_int * a, mp_int * b)
|
||||
int mp_cmp (const mp_int * a, const mp_int * b)
|
||||
{
|
||||
/* compare based on sign */
|
||||
if (a->sign != b->sign) {
|
||||
|
||||
@@ -345,8 +345,8 @@ MP_API int mp_abs (mp_int * a, mp_int * b);
|
||||
MP_API int mp_invmod (mp_int * a, mp_int * b, mp_int * c);
|
||||
int fast_mp_invmod (mp_int * a, mp_int * b, mp_int * c);
|
||||
MP_API int mp_invmod_slow (mp_int * a, mp_int * b, mp_int * c);
|
||||
MP_API int mp_cmp_mag (mp_int * a, mp_int * b);
|
||||
MP_API int mp_cmp (mp_int * a, mp_int * b);
|
||||
MP_API int mp_cmp_mag (const mp_int * a, const mp_int * b);
|
||||
MP_API int mp_cmp (const mp_int * a, const mp_int * b);
|
||||
#define mp_cmp_ct(a, b, n) mp_cmp(a, b)
|
||||
MP_API int mp_cmp_d(mp_int * a, mp_digit b);
|
||||
MP_API int mp_set (mp_int * a, mp_digit b);
|
||||
|
||||
Reference in New Issue
Block a user