Class: Ccrypto::ECCConfig

Inherits:
KeypairConfig show all
Defined in:
lib/ccrypto/configs/keypair_config.rb

Instance Attribute Summary collapse

Attributes inherited from KeypairConfig

#algo, #keypair, #private_key, #public_key

Attributes included from AlgoConfig

#provider_config

Instance Method Summary collapse

Methods inherited from KeypairConfig

#has_keypair?, #has_private_key?, #has_public_key?

Methods included from AlgoConfig

include, #provider_info

Constructor Details

#initialize(curve = nil) ⇒ ECCConfig

Returns a new instance of ECCConfig.



33
34
35
36
# File 'lib/ccrypto/configs/keypair_config.rb', line 33

def initialize(curve = nil)
  @algo = :ecc
  @curve = curve || :prime256v1
end

Instance Attribute Details

#curveObject

Returns the value of attribute curve.



32
33
34
# File 'lib/ccrypto/configs/keypair_config.rb', line 32

def curve
  @curve
end

Instance Method Details

#to_sObject



38
39
40
# File 'lib/ccrypto/configs/keypair_config.rb', line 38

def to_s
  "ECC-#{@curve}"
end