Skip to content
instance method

OpenSSL::PKey::DSA#public_key

() -> self
dsa.public_key → dsanew

Returns a new DSA instance that carries just the DSA parameters and the public key.

This method is provided for backwards compatibility. In most cases, there is no need to call this method.

For the purpose of serializing the public key, to PEM or DER encoding of X.509 SubjectPublicKeyInfo format, check PKey#public_to_pem and PKey#public_to_der.

See also #public? #set_key #private? #set_pqg also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0