Class: Orthrus::SSH::PrivateKey

Inherits:
Key
  • Object
show all
Defined in:
lib/orthrus/ssh/key.rb

Direct Known Subclasses

DSAPrivateKey, RSAPrivateKey

Instance Attribute Summary

Attributes inherited from Key

#comment, #key

Instance Method Summary collapse

Methods inherited from Key

#dsa?, #fingerprint, #initialize, #inspect, #rsa?

Constructor Details

This class inherits a constructor from Orthrus::SSH::Key

Instance Method Details

#hexsign(data) ⇒ Object



35
36
37
# File 'lib/orthrus/ssh/key.rb', line 35

def hexsign(data)
  [sign(data)].pack("m").gsub("\n","")
end

#sign(data) ⇒ Object



31
32
33
# File 'lib/orthrus/ssh/key.rb', line 31

def sign(data)
  @key.sign @digest.new, data
end