Class: Kafo::Params::Password
- Inherits:
-
Kafo::Param
- Object
- Kafo::Param
- Kafo::Params::Password
- Defined in:
- lib/kafo/params/password.rb
Overview
A password paramater is stored encrypted in answer file using AES 256 in CBC mode
we use a passphrase that is stored in kafo.yaml for encryption encrypted password is prefixed with $1$ (for historical reasons, no connection to Modular Crypt Format)
Instance Attribute Summary
Attributes inherited from Kafo::Param
#condition, #default, #doc, #groups, #module, #name, #value_set
Instance Method Summary collapse
Methods inherited from Kafo::Param
#<=>, #dump_default, #initialize, #module_name, #multivalued?, #set_default, #set_value_by_config, #to_s, #valid?, #visible?
Constructor Details
This class inherits a constructor from Kafo::Param
Instance Method Details
#condition_value ⇒ Object
22 23 24 |
# File 'lib/kafo/params/password.rb', line 22 def condition_value "\"#{value}\"" end |
#value ⇒ Object
18 19 20 |
# File 'lib/kafo/params/password.rb', line 18 def value @encrypted end |
#value=(value) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/kafo/params/password.rb', line 9 def value=(value) super if @value.nil? || @value.empty? @value = password_manager.password end setup_password if @value.is_a?(::String) @value end |