Class: Ccrypto::KeyConfig

Inherits:
Object
  • Object
show all
Includes:
AlgoConfig
Defined in:
lib/ccrypto/configs/key_config.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from AlgoConfig

include

Constructor Details

#initialize(algo, keysize) ⇒ KeyConfig

Returns a new instance of KeyConfig.



11
12
13
14
# File 'lib/ccrypto/configs/key_config.rb', line 11

def initialize(algo, keysize)
  @algo = algo
  @keysize = keysize
end

Instance Attribute Details

#algoObject (readonly)

Returns the value of attribute algo.



7
8
9
# File 'lib/ccrypto/configs/key_config.rb', line 7

def algo
  @algo
end

#keysizeObject (readonly)

Returns the value of attribute keysize.



7
8
9
# File 'lib/ccrypto/configs/key_config.rb', line 7

def keysize
  @keysize
end

#provider_configObject

Returns the value of attribute provider_config.



9
10
11
# File 'lib/ccrypto/configs/key_config.rb', line 9

def provider_config
  @provider_config
end

Class Method Details

.supported_secret_key_config(&block) ⇒ Object



20
21
22
# File 'lib/ccrypto/configs/key_config.rb', line 20

def self.supported_secret_key_config(&block)
  Provider.instance.provider.supported_secret_key_config(&block)
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/ccrypto/configs/key_config.rb', line 16

def to_s
  "#{@algo}/#{@keysize}"
end