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)


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

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

.open_ssl_classObject

Raises:



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

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

.read(key_data, passphrase) ⇒ Object



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

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