class HrrRbSsh::Compat::OpenSSH::PublicKey

Public Class Methods

new(data_line) click to toggle source
# File lib/hrr_rb_ssh/compat/openssh/public_key.rb, line 11
def initialize data_line
  splitted = data_line.split(' ')
  @algorithm_name = splitted[0]
  public_key_blob = Base64.decode64(splitted[1])
  @publickey = Algorithm::Publickey[@algorithm_name].new public_key_blob
end

Public Instance Methods

algorithm_name() click to toggle source
# File lib/hrr_rb_ssh/compat/openssh/public_key.rb, line 18
def algorithm_name
  @algorithm_name
end
to_pem() click to toggle source
# File lib/hrr_rb_ssh/compat/openssh/public_key.rb, line 22
def to_pem
  @publickey.to_pem
end