Class: ToyOre::Scheme::LeftCiphertext
- Inherits:
-
Object
- Object
- ToyOre::Scheme::LeftCiphertext
- Defined in:
- lib/toy_ore/scheme.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
Instance Method Summary collapse
- #<=>(right_ciphertext) ⇒ Object
-
#initialize(offset, key) ⇒ LeftCiphertext
constructor
A new instance of LeftCiphertext.
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
#key ⇒ Object (readonly)
Returns the value of attribute key.
80 81 82 |
# File 'lib/toy_ore/scheme.rb', line 80 def key @key end |
#offset ⇒ Object (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 |