class ElGamal::Ciphertext
Attributes
ciphertext[RW]
Public Class Methods
new(ciphertext)
click to toggle source
# File lib/elgamal/ciphertext.rb, line 5 def initialize(ciphertext) raise ArgumentError.new("Required a tuple input, eg. [123,456]") unless ciphertext.class == Array and ciphertext.length == 2 @ciphertext = ciphertext end
Public Instance Methods
[](pos)
click to toggle source
# File lib/elgamal/ciphertext.rb, line 16 def [](pos) return @ciphertext[pos] end
to_s()
click to toggle source
# File lib/elgamal/ciphertext.rb, line 12 def to_s @ciphertext.to_s end