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.
63 64 65 66 67 68 |
# File 'lib/ccrypto/configs/kdf_config.rb', line 63 def initialize @algo = :pbkdf2 @salt = SecureRandom.random_bytes(16) @digest = :sha3_256 @iter = rand(300000..500000) end |
Instance Attribute Details
#digest ⇒ Object
Returns the value of attribute digest.
62 63 64 |
# File 'lib/ccrypto/configs/kdf_config.rb', line 62 def digest @digest end |
#iter ⇒ Object
Returns the value of attribute iter.
62 63 64 |
# File 'lib/ccrypto/configs/kdf_config.rb', line 62 def iter @iter end |
#salt ⇒ Object
Returns the value of attribute salt.
62 63 64 |
# File 'lib/ccrypto/configs/kdf_config.rb', line 62 def salt @salt end |