Class: OpenSSL::PKey::EC::Point

Inherits:
Object
  • Object
show all
Defined in:
lib/net/ssh/transport/openssl.rb

Instance Method Summary collapse

Instance Method Details

#ssh_typeObject

Returns the description of this key type used by the SSH2 protocol, like “ecdsa-sha2-nistp256”



235
236
237
# File 'lib/net/ssh/transport/openssl.rb', line 235

def ssh_type
  "ecdsa-sha2-#{CurveNameAliasInv[group.curve_name]}"
end

#to_blobObject

Converts the key to a blob, according to the SSH2 protocol.



240
241
242
243
244
245
# File 'lib/net/ssh/transport/openssl.rb', line 240

def to_blob
  @blob ||= Net::SSH::Buffer.from(:string, ssh_type,
                                  :string, CurveNameAliasInv[group.curve_name],
                                  :mstring, to_bn.to_s(2)).to_s
  @blob
end