Class: Ccrypto::DigestConfig

Inherits:
Object
  • Object
show all
Includes:
AlgoConfig, TR::CondUtils
Defined in:
lib/ccrypto/configs/digest_config.rb

Instance Attribute Summary collapse

Attributes included from AlgoConfig

#provider_config

Instance Method Summary collapse

Methods included from AlgoConfig

include, #provider_info

Constructor Details

#initialize(algo, outBitLen, opts = { }) ⇒ DigestConfig

Returns a new instance of DigestConfig.



11
12
13
14
15
16
17
18
# File 'lib/ccrypto/configs/digest_config.rb', line 11

def initialize(algo, outBitLen, opts = {  })
  @algo = algo
  @outBitLength = outBitLen
  if not_empty?(opts)
    @provider_config = opts[:provider_config]
    @hardInBitLength = opts[:hard_in_bit_length]
  end
end

Instance Attribute Details

#algoObject

Returns the value of attribute algo.



8
9
10
# File 'lib/ccrypto/configs/digest_config.rb', line 8

def algo
  @algo
end

#hardInBitLengthObject

Returns the value of attribute hardInBitLength.



9
10
11
# File 'lib/ccrypto/configs/digest_config.rb', line 9

def hardInBitLength
  @hardInBitLength
end

#nativeDigestEngineObject

Returns the value of attribute nativeDigestEngine.



10
11
12
# File 'lib/ccrypto/configs/digest_config.rb', line 10

def nativeDigestEngine
  @nativeDigestEngine
end

#outBitLengthObject

Returns the value of attribute outBitLength.



8
9
10
# File 'lib/ccrypto/configs/digest_config.rb', line 8

def outBitLength
  @outBitLength
end

Instance Method Details

#has_hard_in_bit_length?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/ccrypto/configs/digest_config.rb', line 20

def has_hard_in_bit_length?
  (not @hardInBitLength.nil?) or @hardInBitLength.to_i > 0
end