Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

OpenSSL::PKey::DSA#to_s

dsa.to_s([cipher, password]) → aString

Alias of #export

Encodes this DSA to its PEM encoding.

Parameters

  • cipher is an OpenSSL::Cipher.

  • password is a string containing your password.

Examples

DSA.to_pem -> aString
DSA.to_pem(cipher, 'mypassword') -> aString
See also #export #to_pem #to_text #to_der also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1