Class: Melos::Struct::HPKECipherText

Inherits:
Base
  • Object
show all
Defined in:
lib/melos/struct/structs.rb

Overview

7.6

Constant Summary collapse

STRUCT =
[
  [:kem_output, :vec],
  [:ciphertext, :vec]
]

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Base

#deserialize_select_elem_with_context, #initialize, #raw

Constructor Details

This class inherits a constructor from Melos::Struct::Base

Instance Attribute Details

#ciphertextObject (readonly)

Returns the value of attribute ciphertext.



168
169
170
# File 'lib/melos/struct/structs.rb', line 168

def ciphertext
  @ciphertext
end

#kem_outputObject (readonly)

Returns the value of attribute kem_output.



168
169
170
# File 'lib/melos/struct/structs.rb', line 168

def kem_output
  @kem_output
end

Class Method Details

.create(kem_output:, ciphertext:) ⇒ Object



174
175
176
177
178
179
# File 'lib/melos/struct/structs.rb', line 174

def self.create(kem_output:, ciphertext:)
  new_instance = self.allocate
  new_instance.instance_variable_set(:@kem_output, kem_output)
  new_instance.instance_variable_set(:@ciphertext, ciphertext)
  new_instance
end