Class: Net::SSH::Transport::OSSL::KeyFactory

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

get load_private_key load_public_key new

### 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

new( algorithms )

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

get( name )

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

load_private_key( filename )

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.

load_public_key( filename )

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]