Class: Ccrypto::PBKDF2Config
- Defined in:
- lib/ccrypto/configs/kdf_config.rb
Instance Attribute Summary collapse
-
#digest ⇒ Object
Returns the value of attribute digest.
-
#iter ⇒ Object
Returns the value of attribute iter.
-
#salt ⇒ Object
Returns the value of attribute salt.
Attributes inherited from KDFConfig
Attributes included from AlgoConfig
Instance Method Summary collapse
-
#initialize ⇒ PBKDF2Config
constructor
A new instance of PBKDF2Config.
Methods included from AlgoConfig
Constructor Details
#initialize ⇒ PBKDF2Config
Returns a new instance of PBKDF2Config.
61 62 63 64 65 |
# File 'lib/ccrypto/configs/kdf_config.rb', line 61 def initialize @salt = SecureRandom.random_bytes(16) @digest = :sha256 @iter = rand(200000..400000) end |
Instance Attribute Details
#digest ⇒ Object
Returns the value of attribute digest.
60 61 62 |
# File 'lib/ccrypto/configs/kdf_config.rb', line 60 def digest @digest end |
#iter ⇒ Object
Returns the value of attribute iter.
60 61 62 |
# File 'lib/ccrypto/configs/kdf_config.rb', line 60 def iter @iter end |
#salt ⇒ Object
Returns the value of attribute salt.
60 61 62 |
# File 'lib/ccrypto/configs/kdf_config.rb', line 60 def salt @salt end |