Module: Orthrus::SSH::RSA
- Included in:
- RSAPrivateKey, RSAPublicKey
- Defined in:
- lib/orthrus/ssh/rsa.rb
Instance Method Summary collapse
Instance Method Details
#initialize(k) ⇒ Object
6 7 8 |
# File 'lib/orthrus/ssh/rsa.rb', line 6 def initialize(k) super k, OpenSSL::Digest::SHA1 end |
#public_identity(base64 = true) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/orthrus/ssh/rsa.rb', line 10 def public_identity(base64=true) b = Buffer.from :string, "ssh-rsa", :bignum, @key.e, :bignum, @key.n d = b.to_s return d unless base64 Utils.encode64 d end |
#type ⇒ Object
22 23 24 |
# File 'lib/orthrus/ssh/rsa.rb', line 22 def type "ssh-rsa" end |