method

new

v1_9_2_180 - Show latest stable - Class: OpenSSL::PKey::RSA
new(p1 = v1, p2 = v2)
public

Parameters

  • size is an integer representing the desired key size.

  • encoded_key is a string containing PEM or DER encoded key.

  • pass is an optional string with the password to decrypt the encoded key.

Examples

  • RSA.new(2048) -> rsa

  • RSA.new(File.read(“rsa.pem”)) -> rsa

  • RSA.new(File.read(“rsa.pem”), “mypassword”) -> rsa