class EllipticCurve::PublicKey
Attributes
openSslPublicKey[R]
Public Class Methods
fromDer(string)
click to toggle source
# File lib/publickey.rb, line 27 def self.fromDer(string) return PublicKey.new(OpenSSL::PKey::EC.new(string)) end
fromPem(string)
click to toggle source
# File lib/publickey.rb, line 23 def self.fromPem(string) return PublicKey.new(OpenSSL::PKey::EC.new(string)) end
fromString(string)
click to toggle source
# File lib/publickey.rb, line 31 def self.fromString(string) return PublicKey.new(OpenSSL::PKey::EC.new(Base64.decode64(string))) end
new(openSslPublicKey)
click to toggle source
# File lib/publickey.rb, line 5 def initialize(openSslPublicKey) @openSslPublicKey = openSslPublicKey end
Public Instance Methods
toDer()
click to toggle source
# File lib/publickey.rb, line 15 def toDer @openSslPublicKey.to_der() end
toPem()
click to toggle source
# File lib/publickey.rb, line 19 def toPem @openSslPublicKey.to_pem() end
toString()
click to toggle source
# File lib/publickey.rb, line 11 def toString return Base64.encode64(self.toDer()) end