Class: Ccrypto::PBKDF2Config

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

Overview

HKDFConfig

Instance Attribute Summary collapse

Attributes inherited from KDFConfig

#algo

Instance Method Summary collapse

Methods included from AlgoConfig

include

Constructor Details

#initializePBKDF2Config

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

#digestObject

Returns the value of attribute digest.



65
66
67
# File 'lib/ccrypto/configs/kdf_config.rb', line 65

def digest
  @digest
end

#iterObject

Returns the value of attribute iter.



65
66
67
# File 'lib/ccrypto/configs/kdf_config.rb', line 65

def iter
  @iter
end

#outBitLengthObject

Returns the value of attribute outBitLength.



66
67
68
# File 'lib/ccrypto/configs/kdf_config.rb', line 66

def outBitLength
  @outBitLength
end

#saltObject

Returns the value of attribute salt.



65
66
67
# File 'lib/ccrypto/configs/kdf_config.rb', line 65

def salt
  @salt
end