Class: Net::SSH::KeyFactory::OpenSSLKeyTypeBase

Inherits:
KeyType
  • Object
show all
Defined in:
lib/net/ssh/key_factory.rb

Class Method Summary collapse

Methods inherited from KeyType

error_classes

Class Method Details

.encrypted_key?(key_data, error) ⇒ Boolean

Returns:

  • (Boolean)

146
147
148
# File 'lib/net/ssh/key_factory.rb', line 146

def self.encrypted_key?(key_data, error)
  key_data.match(/ENCRYPTED/)
end

.open_ssl_classObject

Raises:


138
139
140
# File 'lib/net/ssh/key_factory.rb', line 138

def self.open_ssl_class
  raise Exception, "TODO: subclasses should implement"
end

.read(key_data, passphrase) ⇒ Object


142
143
144
# File 'lib/net/ssh/key_factory.rb', line 142

def self.read(key_data, passphrase)
  open_ssl_class.new(key_data, passphrase)
end