Class OpenSSL::PKey::RSA

  1. lib/net/ssh/transport/openssl.rb
Parent: Object

This class is originally defined in the OpenSSL module. As needed, methods have been added to it by the Net::SSH module for convenience in dealing with SSH functionality.

Methods

public instance

  1. ssh_do_sign
  2. ssh_do_verify
  3. ssh_type
  4. to_blob

Public instance methods

ssh_do_sign (data)

Returns the signature for the given data.

[show source]
    # File lib/net/ssh/transport/openssl.rb, line 73
73:       def ssh_do_sign(data)
74:         sign(OpenSSL::Digest::SHA1.new, data)
75:       end
ssh_do_verify (sig, data)

Verifies the given signature matches the given data.

[show source]
    # File lib/net/ssh/transport/openssl.rb, line 68
68:       def ssh_do_verify(sig, data)
69:         verify(OpenSSL::Digest::SHA1.new, sig, data)
70:       end
ssh_type ()

Returns “ssh-rsa”, which is the description of this key type used by the SSH2 protocol.

[show source]
    # File lib/net/ssh/transport/openssl.rb, line 58
58:       def ssh_type
59:         "ssh-rsa"
60:       end
to_blob ()

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

[show source]
    # File lib/net/ssh/transport/openssl.rb, line 63
63:       def to_blob
64:         @blob ||= Net::SSH::Buffer.from(:string, ssh_type, :bignum, e, :bignum, n).to_s
65:       end