Class: ToyOre::Scheme::LeftCiphertext

Inherits:
Object
  • Object
show all
Defined in:
lib/toy_ore/scheme.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(offset, key) ⇒ LeftCiphertext

Returns a new instance of LeftCiphertext.



82
83
84
85
# File 'lib/toy_ore/scheme.rb', line 82

def initialize(offset, key)
  @offset = offset
  @key = key
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



80
81
82
# File 'lib/toy_ore/scheme.rb', line 80

def key
  @key
end

#offsetObject (readonly)

Returns the value of attribute offset.



80
81
82
# File 'lib/toy_ore/scheme.rb', line 80

def offset
  @offset
end

Instance Method Details

#<=>(right_ciphertext) ⇒ Object



87
88
89
# File 'lib/toy_ore/scheme.rb', line 87

def <=>(right_ciphertext)
  ToyOre::Scheme.compare_ciphertexts(self, right_ciphertext)
end