Class: Ccrypto::DigestConfig
- Inherits:
-
Object
- Object
- Ccrypto::DigestConfig
- Includes:
- AlgoConfig, TR::CondUtils
- Defined in:
- lib/ccrypto/configs/digest_config.rb
Instance Attribute Summary collapse
-
#algo ⇒ Object
Returns the value of attribute algo.
-
#hardInBitLength ⇒ Object
Returns the value of attribute hardInBitLength.
-
#nativeDigestEngine ⇒ Object
Returns the value of attribute nativeDigestEngine.
-
#outBitLength ⇒ Object
Returns the value of attribute outBitLength.
Attributes included from AlgoConfig
Instance Method Summary collapse
- #has_hard_in_bit_length? ⇒ Boolean
-
#initialize(algo, outBitLen, opts = { }) ⇒ DigestConfig
constructor
A new instance of DigestConfig.
Methods included from AlgoConfig
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
#algo ⇒ Object
Returns the value of attribute algo.
8 9 10 |
# File 'lib/ccrypto/configs/digest_config.rb', line 8 def algo @algo end |
#hardInBitLength ⇒ Object
Returns the value of attribute hardInBitLength.
9 10 11 |
# File 'lib/ccrypto/configs/digest_config.rb', line 9 def hardInBitLength @hardInBitLength end |
#nativeDigestEngine ⇒ Object
Returns the value of attribute nativeDigestEngine.
10 11 12 |
# File 'lib/ccrypto/configs/digest_config.rb', line 10 def nativeDigestEngine @nativeDigestEngine end |
#outBitLength ⇒ Object
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
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 |