(set via a call to BN_GENCB_set or BN_GENCB_set_old) using BN_GENCB_get_arg.</p>

<p>BN_generate_prime() (deprecated) works in the same way as BN_generate_prime_ex() but expects an old-style callback function directly in the <b>callback</b> parameter, and an argument to pass to it in the <b>cb_arg</b>. BN_is_prime() and BN_is_prime_fasttest() can similarly be compared to BN_is_prime_ex() and BN_is_prime_fasttest_ex(), respectively.</p>

<h1 id="RETURN-VALUES">RETURN VALUES</h1>

<p>BN_generate_prime_ex() re