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
readonly
Returns the value of attribute algo.
-
#fixed_input_len_byte ⇒ Object
readonly
Returns the value of attribute fixed_input_len_byte.
-
#outBitLength ⇒ Object
readonly
Returns the value of attribute outBitLength.
-
#outByteLength ⇒ Object
readonly
Returns the value of attribute outByteLength.
-
#provider_config ⇒ Object
variable allow provider to put things related to the provider e.g.
Instance Method Summary collapse
- #has_fixed_input_len_byte? ⇒ 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.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ccrypto/configs/digest_config.rb', line 12 def initialize(algo, outBitLen, opts = { }) @algo = algo @outBitLength = outBitLen @outByteLength = @outBitLength/8 if not_empty?(opts) @provider_config = opts[:provider_config] @fixed_input_len_byte = opts[:fixed_input_len_byte] || -1 else @provider_config = {} @fixed_input_len_byte = -1 end end |
Instance Attribute Details
#algo ⇒ Object (readonly)
Returns the value of attribute algo.
8 9 10 |
# File 'lib/ccrypto/configs/digest_config.rb', line 8 def algo @algo end |
#fixed_input_len_byte ⇒ Object (readonly)
Returns the value of attribute fixed_input_len_byte.
9 10 11 |
# File 'lib/ccrypto/configs/digest_config.rb', line 9 def fixed_input_len_byte @fixed_input_len_byte end |
#outBitLength ⇒ Object (readonly)
Returns the value of attribute outBitLength.
8 9 10 |
# File 'lib/ccrypto/configs/digest_config.rb', line 8 def outBitLength @outBitLength end |
#outByteLength ⇒ Object (readonly)
Returns the value of attribute outByteLength.
8 9 10 |
# File 'lib/ccrypto/configs/digest_config.rb', line 8 def outByteLength @outByteLength end |
#provider_config ⇒ Object
variable allow provider to put things related to the provider e.g. JCE provider etc
11 12 13 |
# File 'lib/ccrypto/configs/digest_config.rb', line 11 def provider_config @provider_config end |
Instance Method Details
#has_fixed_input_len_byte? ⇒ Boolean
26 27 28 |
# File 'lib/ccrypto/configs/digest_config.rb', line 26 def has_fixed_input_len_byte? @fixed_input_len_byte != -1 end |