Class: Ciri::DevP2P::RLPX::Secrets

Inherits:
Object
  • Object
show all
Defined in:
lib/ciri/devp2p/rlpx/secrets.rb

Overview

class used to store rplx protocol secrets

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(remote_id: nil, aes:, mac:) ⇒ Secrets


33
34
35
36
37
# File 'lib/ciri/devp2p/rlpx/secrets.rb', line 33

def initialize(remote_id: nil, aes:, mac:)
  @remote_id = remote_id
  @aes = aes
  @mac = mac
end

Instance Attribute Details

#aesObject (readonly)

Returns the value of attribute aes


30
31
32
# File 'lib/ciri/devp2p/rlpx/secrets.rb', line 30

def aes
  @aes
end

#egress_macObject

Returns the value of attribute egress_mac


31
32
33
# File 'lib/ciri/devp2p/rlpx/secrets.rb', line 31

def egress_mac
  @egress_mac
end

#ingress_macObject

Returns the value of attribute ingress_mac


31
32
33
# File 'lib/ciri/devp2p/rlpx/secrets.rb', line 31

def ingress_mac
  @ingress_mac
end

#macObject (readonly)

Returns the value of attribute mac


30
31
32
# File 'lib/ciri/devp2p/rlpx/secrets.rb', line 30

def mac
  @mac
end

#remote_idObject (readonly)

Returns the value of attribute remote_id


30
31
32
# File 'lib/ciri/devp2p/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/devp2p/rlpx/secrets.rb', line 39

def ==(other)
  self.class == other.class &&
    remote_id == other.remote &&
    aes == other.aes &&
    mac == other.mac
end