Class: Ccrypto::ECCConfig
- Inherits:
-
KeypairConfig
- Object
- KeypairConfig
- Ccrypto::ECCConfig
- Defined in:
- lib/ccrypto/configs/keypair_config.rb
Overview
KeypairConfig
Constant Summary
Constants inherited from KeypairConfig
KeypairConfig::Algo_Active, KeypairConfig::Algo_Broken, KeypairConfig::Algo_NotRecommended, KeypairConfig::Algo_Obsolete
Instance Attribute Summary collapse
-
#curve ⇒ Object
readonly
Returns the value of attribute curve.
Attributes inherited from KeypairConfig
#algo, #algo_status, #default, #keypair, #private_key, #provider_config, #public_key
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(curve = nil, status = Algo_Active, default = false) ⇒ ECCConfig
constructor
A new instance of ECCConfig.
- #param ⇒ Object
- #to_s ⇒ Object
Methods inherited from KeypairConfig
#has_keypair?, #has_private_key?, #has_public_key?, #is_default_algo?, keypair_purposes, supported_keypair_config
Methods included from AlgoConfig
Constructor Details
#initialize(curve = nil, status = Algo_Active, default = false) ⇒ ECCConfig
Returns a new instance of ECCConfig.
76 77 78 79 80 81 |
# File 'lib/ccrypto/configs/keypair_config.rb', line 76 def initialize(curve = nil, status = Algo_Active, default = false) @algo = self.class.algo_key @curve = curve || :prime256v1 @curve = @curve.to_sym if not @curve.is_a?(Symbol) super(status, default) end |
Instance Attribute Details
#curve ⇒ Object (readonly)
Returns the value of attribute curve.
75 76 77 |
# File 'lib/ccrypto/configs/keypair_config.rb', line 75 def curve @curve end |
Class Method Details
.algo_key ⇒ Object
71 72 73 |
# File 'lib/ccrypto/configs/keypair_config.rb', line 71 def self.algo_key :ecc end |
.algo_name ⇒ Object
67 68 69 |
# File 'lib/ccrypto/configs/keypair_config.rb', line 67 def self.algo_name "Elliptic Curve (ECC) (Classical - Signing and Encryption)" end |
Instance Method Details
#param ⇒ Object
83 84 85 |
# File 'lib/ccrypto/configs/keypair_config.rb', line 83 def param @curve end |
#to_s ⇒ Object
87 88 89 |
# File 'lib/ccrypto/configs/keypair_config.rb', line 87 def to_s "ECC - #{@curve}" end |