X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcmath%2Fsilcprimegen.c;h=beb07f285f87ea09d3cba6d34638a4f66c9682ce;hb=72cfa31520ebc0058763a30e21c13f6e9a964aa0;hp=decb9538edbe46c2ea00675b5377f98359a2bdde;hpb=2be0be2432fff760084c4093291e79f1fa6262d8;p=silc.git diff --git a/lib/silcmath/silcprimegen.c b/lib/silcmath/silcprimegen.c index decb9538..beb07f28 100644 --- a/lib/silcmath/silcprimegen.c +++ b/lib/silcmath/silcprimegen.c @@ -53,7 +53,7 @@ */ -static unsigned int primetable[] = +static uint32 primetable[] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, @@ -195,11 +195,11 @@ static unsigned int primetable[] = If argument verbose is TRUE this will display some status information about the progress of generation. */ -int silc_math_gen_prime(SilcInt *prime, unsigned int bits, int verbose) +int silc_math_gen_prime(SilcInt *prime, uint32 bits, int verbose) { unsigned char *numbuf; - unsigned int i, b, k; - unsigned int *spmods; + uint32 i, b, k; + uint32 *spmods; SilcInt r, base, tmp, tmp2, oprime; silc_mp_init(&r); @@ -229,7 +229,7 @@ int silc_math_gen_prime(SilcInt *prime, unsigned int bits, int verbose) /* Init modulo table with the prime candidate and the primes in the primetable. */ - spmods = silc_calloc(1, sizeof(primetable) * sizeof(unsigned int)); + spmods = silc_calloc(1, sizeof(primetable) * sizeof(uint32)); for (i = 0; primetable[i] != 0; i++) { silc_mp_mod_ui(&tmp, prime, primetable[i]); spmods[i] = silc_mp_get_ui(&tmp);