Class: Ccrypto::PBKDF2Config
- Defined in:
- lib/ccrypto/configs/kdf_config.rb
Overview
HKDFConfig
Instance Attribute Summary collapse
-
#digest ⇒ Object
Returns the value of attribute digest.
-
#iter ⇒ Object
Returns the value of attribute iter.
-
#outBitLength ⇒ Object
Returns the value of attribute outBitLength.
-
#salt ⇒ Object
Returns the value of attribute salt.
Attributes inherited from KDFConfig
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.
67 68 69 70 71 72 |
# File 'lib/ccrypto/configs/kdf_config.rb', line 67 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.
65 66 67 |
# File 'lib/ccrypto/configs/kdf_config.rb', line 65 def digest @digest end |
#iter ⇒ Object
Returns the value of attribute iter.
65 66 67 |
# File 'lib/ccrypto/configs/kdf_config.rb', line 65 def iter @iter end |
#outBitLength ⇒ Object
Returns the value of attribute outBitLength.
66 67 68 |
# File 'lib/ccrypto/configs/kdf_config.rb', line 66 def outBitLength @outBitLength end |
#salt ⇒ Object
Returns the value of attribute salt.
65 66 67 |
# File 'lib/ccrypto/configs/kdf_config.rb', line 65 def salt @salt end |