Class: Ccrypto::DirectCipherConfig

Inherits:
CipherConfig show all
Defined in:
lib/ccrypto/configs/cipher_config.rb

Instance Attribute Summary

Attributes inherited from CipherConfig

#algo, #cipherOps, #iv, #ivLength, #key, #keysize, #mode, #padding

Attributes included from AlgoConfig

#provider_config

Instance Method Summary collapse

Methods inherited from CipherConfig

#decrypt_cipher_mode, #encrypt_cipher_mode, #has_iv?, #has_key?, #is_algo?, #is_decrypt_cipher_mode?, #is_encrypt_cipher_mode?, #is_mode?, #logger, #to_s

Methods included from AlgoConfig

include, #provider_info

Constructor Details

#initialize(str) ⇒ DirectCipherConfig

str can be String or Hash If String it will be directly used by underlying engine with minimum parsing which means might not have other info

Raises:

  • (CipherConfigException)


138
139
140
141
# File 'lib/ccrypto/configs/cipher_config.rb', line 138

def initialize(str)
  raise CipherConfigException, "Hash is expected" if not str.is_a?(Hash)
  super(str[:algo], str)
end