Skip to content

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

instance method

OpenSSL::PKey::DSA#to_pem

dsa.to_pem([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_der #to_s #sysverify also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0