instance method
OpenSSL::PKey::RSA#public?
() -> bool
rsa.public? => true
ext/openssl/ossl_pkey_rsa.c
View on GitHub ↗
static VALUE
ossl_rsa_is_public(VALUE self)
{
OSSL_3_const RSA *rsa;
GetRSA(self, rsa);
/*
* This method should check for n and e. BUG.
*/
(void)rsa;
return Qtrue;
}
The return value is always true since every private key is also a public key.
See also
#private_encrypt
#public_decrypt
#private_decrypt
#public_encrypt
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0