Class: RSA::Public
- Inherits:
-
Object
- Object
- RSA::Public
- Defined in:
- lib/rsa.rb
Instance Attribute Summary collapse
-
#e ⇒ Object
readonly
Returns the value of attribute e.
-
#key_n ⇒ Object
readonly
Returns the value of attribute key_n.
Instance Method Summary collapse
- #create_file(archive) ⇒ Object
- #create_file_of_keys ⇒ Object
-
#initialize(private:) ⇒ Public
constructor
A new instance of Public.
Constructor Details
#initialize(private:) ⇒ Public
Returns a new instance of Public.
101 102 103 104 105 |
# File 'lib/rsa.rb', line 101 def initialize(private:) generated(private) choice_e(private) private.generated_d(@e) end |
Instance Attribute Details
#e ⇒ Object (readonly)
Returns the value of attribute e.
99 100 101 |
# File 'lib/rsa.rb', line 99 def e @e end |
#key_n ⇒ Object (readonly)
Returns the value of attribute key_n.
99 100 101 |
# File 'lib/rsa.rb', line 99 def key_n @key_n end |
Instance Method Details
#create_file(archive) ⇒ Object
112 113 114 |
# File 'lib/rsa.rb', line 112 def create_file(archive) archive.write [@key_n, @e] end |
#create_file_of_keys ⇒ Object
107 108 109 110 |
# File 'lib/rsa.rb', line 107 def create_file_of_keys public_key_file = ArchivePublic.new public_key_file.write keys end |