class Net::SSH::Authentication::ED25519::PrivKey

Constants

CipherFactory
MAGIC
MBEGIN
MEND

Attributes

sign_key[R]

Public Class Methods

new(buffer) click to toggle source
# File lib/net/ssh/authentication/ed25519.rb, line 150
def initialize(buffer)
  pk = buffer.read_string
  sk = buffer.read_string
  _comment = buffer.read_string

  @pk = pk
  @sign_key = SigningKeyFromFile.new(pk, sk)
end
read(data, password) click to toggle source
# File lib/net/ssh/authentication/ed25519.rb, line 179
def self.read(data, password)
  OpenSSHPrivateKeyLoader.read(data, password)
end

Public Instance Methods

public_key() click to toggle source
# File lib/net/ssh/authentication/ed25519.rb, line 171
def public_key
  PubKey.new(@pk)
end
ssh_do_sign(data, sig_alg = nil) click to toggle source
# File lib/net/ssh/authentication/ed25519.rb, line 175
def ssh_do_sign(data, sig_alg = nil)
  @sign_key.sign(data)
end
ssh_signature_type() click to toggle source
# File lib/net/ssh/authentication/ed25519.rb, line 167
def ssh_signature_type
  ssh_type
end
ssh_type() click to toggle source
# File lib/net/ssh/authentication/ed25519.rb, line 163
def ssh_type
  "ssh-ed25519"
end
to_blob() click to toggle source
# File lib/net/ssh/authentication/ed25519.rb, line 159
def to_blob
  public_key.to_blob
end