Class: Ccrypto::PBKDF2Config

Inherits:
KDFConfig show all
Defined in:
lib/ccrypto/configs/kdf_config.rb

Instance Attribute Summary collapse

Attributes inherited from KDFConfig

#algo, #outBitLength

Attributes included from AlgoConfig

#provider_config

Instance Method Summary collapse

Methods included from AlgoConfig

include, #provider_info

Constructor Details

#initializePBKDF2Config

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

#digestObject

Returns the value of attribute digest.



60
61
62
# File 'lib/ccrypto/configs/kdf_config.rb', line 60

def digest
  @digest
end

#iterObject

Returns the value of attribute iter.



60
61
62
# File 'lib/ccrypto/configs/kdf_config.rb', line 60

def iter
  @iter
end

#saltObject

Returns the value of attribute salt.



60
61
62
# File 'lib/ccrypto/configs/kdf_config.rb', line 60

def salt
  @salt
end