Class: Zwiebel::HiddenService::IntroductionPoint

Inherits:
Object
  • Object
show all
Defined in:
lib/zwiebel/hidden_service/introduction_point.rb

Defined Under Namespace

Classes: LinkSpecifier

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:) ⇒ IntroductionPoint

Returns a new instance of IntroductionPoint.



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/zwiebel/hidden_service/introduction_point.rb', line 22

def initialize(data:)
  @link_specifiers = []
  @link_specifier  = data["introduction-point"]
  @onion_key       = data["onion-key"]
  @auth_key        = data["auth-key"]
  @enc_key         = data["enc-key"]
  @enc_key_cert    = data["enc-key-cert"]
  @legacy_key      = data["legacy-key"]
  @legacy_key_cert = data["legacy-key-cert"]
  store_keys
  decode_link_specifier
end

Instance Attribute Details

#auth_key_ed25519Object

Returns the value of attribute auth_key_ed25519.



20
21
22
# File 'lib/zwiebel/hidden_service/introduction_point.rb', line 20

def auth_key_ed25519
  @auth_key_ed25519
end

#enc_key_cert_ed25519Object

Returns the value of attribute enc_key_cert_ed25519.



20
21
22
# File 'lib/zwiebel/hidden_service/introduction_point.rb', line 20

def enc_key_cert_ed25519
  @enc_key_cert_ed25519
end

Returns the value of attribute link_specifiers.



20
21
22
# File 'lib/zwiebel/hidden_service/introduction_point.rb', line 20

def link_specifiers
  @link_specifiers
end

Instance Method Details

#enc_keyObject



39
40
41
# File 'lib/zwiebel/hidden_service/introduction_point.rb', line 39

def enc_key
  @enc_key&.gsub("ntor ", "")
end

#onion_keyObject



35
36
37
# File 'lib/zwiebel/hidden_service/introduction_point.rb', line 35

def onion_key
  @onion_key&.gsub("ntor ", "")
end