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.



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

#digestObject

Returns the value of attribute digest.



62
63
64
# File 'lib/ccrypto/configs/kdf_config.rb', line 62

def digest
  @digest
end

#iterObject

Returns the value of attribute iter.



62
63
64
# File 'lib/ccrypto/configs/kdf_config.rb', line 62

def iter
  @iter
end

#saltObject

Returns the value of attribute salt.



62
63
64
# File 'lib/ccrypto/configs/kdf_config.rb', line 62

def salt
  @salt
end