Class Net::SSH::Transport::OSSL::KeyFactory
In: lib/net/ssh/transport/ossl/key-factory.rb
Parent: Object

A factory class for returning new Key algorithm factories (actually classes).

Methods

Attributes

buffers  [W]  The setter for the buffer factory to use.
prompter  [W]  The setter for describing which prompter service to use when prompting the user for a key passphrase.

Public Class methods

Create a new instance of the KeyFactory that uses the given Hash-like to map SSH2 key algorithm names to names of factories (classes) that can instantiate those algorithms.

Public Instance methods

Return a new instance of the key factory for the given name. If no such algorithm exists, a KeyTypeNotFound error will be raised.

Loads a private key from a file. It will correctly determine whether the file describes an RSA or DSA key, and will load it appropriately. The new key is returned. If the key itself is encrypted (requiring a passphrase to use), the user will be prompted to enter their password.

Loads a public key from a file. It will correctly determine whether the file describes an RSA or DSA key, and will load it appropriately. The new public key is returned.

[Validate]