method

read

v2_6_3 - Show latest stable - Class: OpenSSL::PKey
read(p1, p2 = v2)
public

Reads a DER or PEM encoded string from string or io and returns an instance of the appropriate PKey class.

Parameters

  • _string+ is a DER- or PEM-encoded string containing an arbitrary private or public key.

  • io is an instance of IO containing a DER- or PEM-encoded arbitrary private or public key.

  • pwd is an optional password in case string or io is an encrypted PEM resource.