Previous: Generation, Up: Prime numbers


11.2 Checking

— Function: gcry_error_t gcry_prime_check (gcry_mpi_t p, unsigned int flags)

Check wether the number p is prime. Returns zero in case p is indeed a prime, returns GPG_ERR_NO_PRIME in case p is not a prime and a different error code in case something went horribly wrong.