Class: Ciri::P2P::RLPX::Secrets
- Inherits:
-
Object
- Object
- Ciri::P2P::RLPX::Secrets
- Defined in:
- lib/ciri/p2p/rlpx/secrets.rb
Overview
class used to store rplx protocol secrets
Instance Attribute Summary collapse
-
#aes ⇒ Object
readonly
Returns the value of attribute aes.
-
#egress_mac ⇒ Object
Returns the value of attribute egress_mac.
-
#ingress_mac ⇒ Object
Returns the value of attribute ingress_mac.
-
#mac ⇒ Object
readonly
Returns the value of attribute mac.
-
#remote_id ⇒ Object
readonly
Returns the value of attribute remote_id.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(remote_id: nil, aes:, mac:) ⇒ Secrets
constructor
A new instance of Secrets.
Constructor Details
#initialize(remote_id: nil, aes:, mac:) ⇒ Secrets
Returns a new instance of Secrets.
33 34 35 36 37 |
# File 'lib/ciri/p2p/rlpx/secrets.rb', line 33 def initialize(remote_id: nil, aes:, mac:) @remote_id = remote_id @aes = aes @mac = mac end |
Instance Attribute Details
#aes ⇒ Object (readonly)
Returns the value of attribute aes.
30 31 32 |
# File 'lib/ciri/p2p/rlpx/secrets.rb', line 30 def aes @aes end |
#egress_mac ⇒ Object
Returns the value of attribute egress_mac.
31 32 33 |
# File 'lib/ciri/p2p/rlpx/secrets.rb', line 31 def egress_mac @egress_mac end |
#ingress_mac ⇒ Object
Returns the value of attribute ingress_mac.
31 32 33 |
# File 'lib/ciri/p2p/rlpx/secrets.rb', line 31 def ingress_mac @ingress_mac end |
#mac ⇒ Object (readonly)
Returns the value of attribute mac.
30 31 32 |
# File 'lib/ciri/p2p/rlpx/secrets.rb', line 30 def mac @mac end |
#remote_id ⇒ Object (readonly)
Returns the value of attribute remote_id.
30 31 32 |
# File 'lib/ciri/p2p/rlpx/secrets.rb', line 30 def remote_id @remote_id end |
Instance Method Details
#==(other) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/ciri/p2p/rlpx/secrets.rb', line 39 def ==(other) self.class == other.class && remote_id == other.remote && aes == other.aes && mac == other.mac end |