Class: Ccrypto::ECCConfig
- Inherits:
-
KeypairConfig
- Object
- KeypairConfig
- Ccrypto::ECCConfig
- Defined in:
- lib/ccrypto/configs/keypair_config.rb
Instance Attribute Summary collapse
-
#curve ⇒ Object
Returns the value of attribute curve.
Attributes inherited from KeypairConfig
#algo, #keypair, #private_key, #public_key
Attributes included from AlgoConfig
Instance Method Summary collapse
-
#initialize(curve = nil) ⇒ ECCConfig
constructor
A new instance of ECCConfig.
- #to_s ⇒ Object
Methods inherited from KeypairConfig
#has_keypair?, #has_private_key?, #has_public_key?
Methods included from AlgoConfig
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
#curve ⇒ Object
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_s ⇒ Object
38 39 40 |
# File 'lib/ccrypto/configs/keypair_config.rb', line 38 def to_s "ECC-#{@curve}" end |