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, #source

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

#sign(data, b64armor = false) ⇒ Object



37
38
39
40
# File 'lib/orthrus/ssh/key.rb', line 37

def sign(data, b64armor=false)
  s = @key.sign @digest.new, data
  b64armor ? Utils.encode64(s) : s
end