Class: ToyOre::Scheme::RightCiphertext

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(iv, encryptions) ⇒ RightCiphertext

Returns a new instance of RightCiphertext.



95
96
97
98
# File 'lib/toy_ore/scheme.rb', line 95

def initialize(iv, encryptions)
  @iv = iv
  @encryptions = encryptions
end

Instance Attribute Details

#encryptionsObject (readonly)

Returns the value of attribute encryptions.



93
94
95
# File 'lib/toy_ore/scheme.rb', line 93

def encryptions
  @encryptions
end

#ivObject (readonly)

Returns the value of attribute iv.



93
94
95
# File 'lib/toy_ore/scheme.rb', line 93

def iv
  @iv
end

Instance Method Details

#<=>(left_ciphertext) ⇒ Object



100
101
102
# File 'lib/toy_ore/scheme.rb', line 100

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