module Net::SSH::Authentication::ED25519Loader

Loads ED25519 support which requires optinal dependecies like rbnacl, bcrypt_pbkdf

Constants

ERROR
LOADED

Public Class Methods

dependenciesRequiredForED25519() click to toggle source
# File lib/net/ssh/authentication/ed25519_loader.rb, line 22
def self.dependenciesRequiredForED25519
  result = "net-ssh requires the following gems for ed25519 support:\n"
  result << " * rbnacl (>= 3.2, < 5.0)\n"
  result << " * rbnacl-libsodium, if your system doesn't have libsodium installed.\n"
  result << " * bcrypt_pbkdf (>= 1.0, < 2.0)\n" unless RUBY_PLATFORM == "java"
  result << "See https://github.com/net-ssh/net-ssh/issues/478 for more information\n"
end
raiseUnlessLoaded(message) click to toggle source
# File lib/net/ssh/authentication/ed25519_loader.rb, line 16
def self.raiseUnlessLoaded(message)
  description = ERROR.is_a?(LoadError) ? dependenciesRequiredForED25519 : ''
  description << "#{ERROR.class} : \"#{ERROR.message}\"\n" if ERROR
  raise NotImplementedError, "#{message}\n#{description}" unless LOADED
end