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).
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. |
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.
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.