Class: RTunnel::SetSessionKeyCommand
- Defined in:
- lib/rtunnel/commands.rb
Instance Attribute Summary collapse
-
#encrypted_keys ⇒ Object
readonly
Returns the value of attribute encrypted_keys.
Instance Method Summary collapse
- #encode(io) ⇒ Object
-
#initialize(encrypted_keys = nil) ⇒ SetSessionKeyCommand
constructor
A new instance of SetSessionKeyCommand.
- #initialize_from_io(io) ⇒ Object
- #to_s ⇒ Object
Methods inherited from Command
command_code, decode, printable_codes, registry, #to_encoded_str
Constructor Details
#initialize(encrypted_keys = nil) ⇒ SetSessionKeyCommand
Returns a new instance of SetSessionKeyCommand.
212 213 214 215 |
# File 'lib/rtunnel/commands.rb', line 212 def initialize(encrypted_keys = nil) super() @encrypted_keys = encrypted_keys end |
Instance Attribute Details
#encrypted_keys ⇒ Object (readonly)
Returns the value of attribute encrypted_keys.
210 211 212 |
# File 'lib/rtunnel/commands.rb', line 210 def encrypted_keys @encrypted_keys end |
Instance Method Details
#encode(io) ⇒ Object
227 228 229 230 |
# File 'lib/rtunnel/commands.rb', line 227 def encode(io) super io.write_varstring @encrypted_keys end |
#initialize_from_io(io) ⇒ Object
221 222 223 224 225 |
# File 'lib/rtunnel/commands.rb', line 221 def initialize_from_io(io) super @encrypted_keys = io.read_varstring self end |
#to_s ⇒ Object
217 218 219 |
# File 'lib/rtunnel/commands.rb', line 217 def to_s super + "/enc_keys=#{@encrypted_key.inspect}" end |