Class: Onionurigen::RSAGen

Inherits:
Object
  • Object
show all
Defined in:
lib/onionurigen/rsa_gen.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRSAGen

Returns a new instance of RSAGen.



7
8
9
10
# File 'lib/onionurigen/rsa_gen.rb', line 7

def initialize
  @private_key = OpenSSL::PKey::RSA.new 1024
  @public_key = @private_key.public_key
end

Instance Attribute Details

#private_keyObject

Returns the value of attribute private_key.



5
6
7
# File 'lib/onionurigen/rsa_gen.rb', line 5

def private_key
  @private_key
end

#public_keyObject

Returns the value of attribute public_key.



5
6
7
# File 'lib/onionurigen/rsa_gen.rb', line 5

def public_key
  @public_key
end