static int isprime(void *a, int b, int *c) { LTC_ARGCHK(a != NULL); LTC_ARGCHK(c != NULL); if (b == 0) { b = LTC_MILLER_RABIN_REPS; } /* if */ *c = (fp_isprime_ex(a, b) == FP_YES) ? LTC_MP_YES : LTC_MP_NO; return CRYPT_OK; }
int fp_isprime(fp_int *a) { return fp_isprime_ex(a, 8); }