class Paillier::PublicKey
Public Class Methods
from_s(string)
click to toggle source
De-serialize a public key string back into object form
Example:
>> s = pub.to_s >> newPub = Paillier::PublicKey.from_s(s) => #<Paillier::PublicKey>
Arguments:
string (String)
# File lib/paillier/keys.rb, line 65 def PublicKey.from_s(string) return PublicKey.new(string.to_i) end
Public Instance Methods
to_s()
click to toggle source
Serialize a public key to string form
Example:
>> priv, pub = Paillier.generateKeypair(2048) >> pub.to_s => "110107191408889682017277609474037601699496910..."
# File lib/paillier/keys.rb, line 52 def to_s return "#{@n}" end