Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
OpenSSL::BN#prime_fasttest?
bn.prime_fasttest? => true | false
bn.prime_fasttest?(checks) => true | false
bn.prime_fasttest?(checks, trial_div) => true | false
ext/openssl/ossl_bn.c
View on GitHub ↗
static VALUE
ossl_bn_is_prime_fasttest(int argc, VALUE *argv, VALUE self)
{
rb_check_arity(argc, 0, 2);
return ossl_bn_is_prime(0, argv, self);
}
Performs a Miller-Rabin probabilistic primality test for bn.
Deprecated in version 3.0. Use prime? instead.
checks and trial_div parameters no longer have any effect.