Class: Ccrypto::RSAConfig
- Inherits:
-
KeypairConfig
- Object
- KeypairConfig
- Ccrypto::RSAConfig
- Defined in:
- lib/ccrypto/configs/keypair_config.rb
Overview
ECCConfig
Constant Summary
Constants inherited from KeypairConfig
KeypairConfig::Algo_Active, KeypairConfig::Algo_Broken, KeypairConfig::Algo_NotRecommended, KeypairConfig::Algo_Obsolete
Instance Attribute Summary collapse
-
#keysize ⇒ Object
readonly
Returns the value of attribute keysize.
Attributes inherited from KeypairConfig
#algo, #algo_status, #default, #keypair, #private_key, #provider_config, #public_key
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(keysize = 2048, status = Algo_Active, default = false) ⇒ RSAConfig
constructor
A new instance of RSAConfig.
- #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(keysize = 2048, status = Algo_Active, default = false) ⇒ RSAConfig
106 107 108 109 110 |
# File 'lib/ccrypto/configs/keypair_config.rb', line 106 def initialize(keysize = 2048, status = Algo_Active, default = false) @algo = self.class.algo_key @keysize = keysize super(status, default) end |
Instance Attribute Details
#keysize ⇒ Object (readonly)
Returns the value of attribute keysize.
105 106 107 |
# File 'lib/ccrypto/configs/keypair_config.rb', line 105 def keysize @keysize end |
Class Method Details
.algo_key ⇒ Object
101 102 103 |
# File 'lib/ccrypto/configs/keypair_config.rb', line 101 def self.algo_key :rsa end |
.algo_name ⇒ Object
97 98 99 |
# File 'lib/ccrypto/configs/keypair_config.rb', line 97 def self.algo_name "RSA (Classical - Signing and Encryption)" end |
.supported_keysizes(&block) ⇒ Object
120 121 122 |
# File 'lib/ccrypto/configs/keypair_config.rb', line 120 def self.supported_keysizes(&block) Provider.instance.provider.algo_instance(*[RSAConfig],&block).supported_keysizes end |
Instance Method Details
#param ⇒ Object
112 113 114 |
# File 'lib/ccrypto/configs/keypair_config.rb', line 112 def param @keysize end |
#to_s ⇒ Object
116 117 118 |
# File 'lib/ccrypto/configs/keypair_config.rb', line 116 def to_s "RSA-#{keysize} bits" end |