diff options
author | nelsonb%netscape.com <devnull@localhost> | 2000-07-28 22:49:42 +0000 |
---|---|---|
committer | nelsonb%netscape.com <devnull@localhost> | 2000-07-28 22:49:42 +0000 |
commit | 3a91e27a0fb755f3574df454be271de5346526c7 (patch) | |
tree | 5f383fc1259f9b447986dd1a3f83672f23a0cf56 /security/nss | |
parent | 2ce2b57a40d1f0ac66e5682731b4fcc322ac9df0 (diff) | |
download | nss-hg-3a91e27a0fb755f3574df454be271de5346526c7.tar.gz |
Use mp_size instead of unsigned int in function prototypes.
Diffstat (limited to 'security/nss')
-rw-r--r-- | security/nss/lib/freebl/mpi/mplogic.c | 8 | ||||
-rw-r--r-- | security/nss/lib/freebl/mpi/mplogic.h | 4 | ||||
-rw-r--r-- | security/nss/lib/freebl/mpi/mpprime.c | 14 | ||||
-rw-r--r-- | security/nss/lib/freebl/mpi/mpprime.h | 8 |
4 files changed, 17 insertions, 17 deletions
diff --git a/security/nss/lib/freebl/mpi/mplogic.c b/security/nss/lib/freebl/mpi/mplogic.c index 993732eb2..5abff6541 100644 --- a/security/nss/lib/freebl/mpi/mplogic.c +++ b/security/nss/lib/freebl/mpi/mplogic.c @@ -405,9 +405,9 @@ mp_err mpl_parity(mp_int *a) Returns MP_OKAY or some error code. Grows a if needed to set a bit to 1. */ -mp_err mpl_set_bit(mp_int *a, unsigned int bitNum, unsigned int value) +mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value) { - unsigned int ix; + mp_size ix; mp_err rv; mp_digit mask; @@ -435,9 +435,9 @@ mp_err mpl_set_bit(mp_int *a, unsigned int bitNum, unsigned int value) returns 0 or 1 or some (negative) error code. */ -mp_err mpl_get_bit(mp_int *a, unsigned int bitNum) +mp_err mpl_get_bit(mp_int *a, mp_size bitNum) { - unsigned int bit, ix; + mp_size bit, ix; mp_err rv; ARGCHK(a != NULL, MP_BADARG); diff --git a/security/nss/lib/freebl/mpi/mplogic.h b/security/nss/lib/freebl/mpi/mplogic.h index b6c528a87..775384869 100644 --- a/security/nss/lib/freebl/mpi/mplogic.h +++ b/security/nss/lib/freebl/mpi/mplogic.h @@ -74,8 +74,8 @@ mp_err mpl_parity(mp_int *a); /* determine parity */ /* Get & Set the value of a bit */ -mp_err mpl_set_bit(mp_int *a, unsigned int bitNum, unsigned int value); -mp_err mpl_get_bit(mp_int *a, unsigned int bitNum); +mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value); +mp_err mpl_get_bit(mp_int *a, mp_size bitNum); mp_err mpl_significant_bits(mp_int *a); #endif /* end _H_MPLOGIC_ */ diff --git a/security/nss/lib/freebl/mpi/mpprime.c b/security/nss/lib/freebl/mpi/mpprime.c index 4a4be276d..00d9d3fe0 100644 --- a/security/nss/lib/freebl/mpi/mpprime.c +++ b/security/nss/lib/freebl/mpi/mpprime.c @@ -270,7 +270,7 @@ mp_err mpp_fermat(mp_int *a, mp_digit w) MP_NO if fermat test reveals it is composite Some MP error code if some other error occurs. */ -mp_err mpp_fermat_list(mp_int *a, const mp_digit *primes, unsigned int nPrimes) +mp_err mpp_fermat_list(mp_int *a, const mp_digit *primes, mp_size nPrimes) { mp_err rv = MP_YES; @@ -393,19 +393,19 @@ X: ** alone!) Each value left in the search space costs 1 or more modular ** exponentations. So, these divisions are a bargain! */ -mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, unsigned int nPrimes, - unsigned char *sieve, unsigned int nSieve) +mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, mp_size nPrimes, + unsigned char *sieve, mp_size nSieve) { mp_err res; mp_digit rem; - unsigned int ix; + mp_size ix; unsigned long offset; memset(sieve, 0, nSieve); for(ix = 0; ix < nPrimes; ix++) { mp_digit prime = primes[ix]; - unsigned int i; + mp_size i; if((res = mp_mod_d(trial, prime, &rem)) != MP_OKAY) return res; @@ -422,7 +422,7 @@ mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, unsigned int nPrimes, return MP_OKAY; } -mp_err mpp_make_prime(mp_int *start, unsigned int nBits, unsigned int strong, +mp_err mpp_make_prime(mp_int *start, mp_size nBits, mp_size strong, unsigned long * nTries) { mp_digit np; @@ -430,7 +430,7 @@ mp_err mpp_make_prime(mp_int *start, unsigned int nBits, unsigned int strong, int i; mp_int trial; mp_int q; - unsigned int num_tests; + mp_size num_tests; unsigned char sieve[32*1024]; ARGCHK(start != 0, MP_BADARG); diff --git a/security/nss/lib/freebl/mpi/mpprime.h b/security/nss/lib/freebl/mpi/mpprime.h index 36e39e700..1204580f6 100644 --- a/security/nss/lib/freebl/mpi/mpprime.h +++ b/security/nss/lib/freebl/mpi/mpprime.h @@ -57,11 +57,11 @@ mp_err mpp_random_size(mp_int *a, mp_size prec); mp_err mpp_divis_vector(mp_int *a, const mp_digit *vec, int size, int *which); mp_err mpp_divis_primes(mp_int *a, mp_digit *np); mp_err mpp_fermat(mp_int *a, mp_digit w); -mp_err mpp_fermat_list(mp_int *a, const mp_digit *primes, unsigned int nPrimes); +mp_err mpp_fermat_list(mp_int *a, const mp_digit *primes, mp_size nPrimes); mp_err mpp_pprime(mp_int *a, int nt); -mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, unsigned int nPrimes, - unsigned char *sieve, unsigned int nSieve); -mp_err mpp_make_prime(mp_int *start, unsigned int nBits, unsigned int strong, +mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, mp_size nPrimes, + unsigned char *sieve, mp_size nSieve); +mp_err mpp_make_prime(mp_int *start, mp_size nBits, mp_size strong, unsigned long * nTries); #endif /* end _H_MP_PRIME_ */ |