Class: Lightning::Onion::HopData
- Inherits:
-
Object
- Object
- Lightning::Onion::HopData
- Defined in:
- lib/lightning/onion/hop_data.rb
Instance Attribute Summary collapse
-
#hmac ⇒ Object
Returns the value of attribute hmac.
-
#per_hop ⇒ Object
Returns the value of attribute per_hop.
-
#realm ⇒ Object
Returns the value of attribute realm.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(realm, per_hop, hmac) ⇒ HopData
constructor
A new instance of HopData.
- #to_payload ⇒ Object
Constructor Details
#initialize(realm, per_hop, hmac) ⇒ HopData
Returns a new instance of HopData.
7 8 9 10 11 |
# File 'lib/lightning/onion/hop_data.rb', line 7 def initialize(realm, per_hop, hmac) @realm = realm @per_hop = per_hop @hmac = hmac end |
Instance Attribute Details
#hmac ⇒ Object
Returns the value of attribute hmac.
6 7 8 |
# File 'lib/lightning/onion/hop_data.rb', line 6 def hmac @hmac end |
#per_hop ⇒ Object
Returns the value of attribute per_hop.
6 7 8 |
# File 'lib/lightning/onion/hop_data.rb', line 6 def per_hop @per_hop end |
#realm ⇒ Object
Returns the value of attribute realm.
6 7 8 |
# File 'lib/lightning/onion/hop_data.rb', line 6 def realm @realm end |
Class Method Details
Instance Method Details
#to_payload ⇒ Object
19 20 21 |
# File 'lib/lightning/onion/hop_data.rb', line 19 def to_payload [realm, per_hop.to_payload, hmac].pack('Ca32a32') end |