Class: Izokatu::Openssl::PrivateKey::Auth::CCM::Encrypter
- Inherits:
-
Encrypter
- Object
- Encrypter
- Default::Encrypter
- Encrypter
- Izokatu::Openssl::PrivateKey::Auth::CCM::Encrypter
- Defined in:
- lib/izokatu/openssl/private_key/auth/ccm/encrypter.rb
Overview
OpenSSL private key encrypter for authenticated ciphers in CCM mode
Constant Summary collapse
- DEFAULT_CCM_IV_LENGTH =
Default iv (nonce) length for ciphers in CCM mode
7
- DEFAULT_CCM_AUTH_TAG_LENGTH =
Default authentication tag length for ciphers in CCM mode
8
Constants inherited from Encrypter
Encrypter::DEFAULT_AUTH_OPTIONS
Constants inherited from Default::Encrypter
Default::Encrypter::DEFAULT_OPTIONS
Constants inherited from Encrypter
Instance Attribute Summary
Attributes inherited from Encrypter
Attributes inherited from Default::Encrypter
Attributes inherited from Encrypter
#clear_data, #encrypted_data, #encrypter
Instance Method Summary collapse
-
#initialize_auth_ccm_encrypter_params! ⇒ Object
private
Set length for iv and auth_tag before their initialization.
-
#initialize_auth_encrypter_params!(auth_data) ⇒ Object
private
Initializing encrypter auth params.
-
#initialize_encrypter_params! ⇒ Object
private
Initializing encrypter params.
-
#initialize_static_message_length! ⇒ Object
private
Initializing message length for cipher in CCM mode.
Methods inherited from Encrypter
#compute_auth_tag!, #decrypter_params, #encrypt_data!, #initialize
Methods inherited from Default::Encrypter
#create_encrypter!, #decrypter_params, #encrypt_data!, #initialize
Methods inherited from Encrypter
#encrypt_data!, #import_clear_data!, #initialize, #perform
Methods included from Callable
Constructor Details
This class inherits a constructor from Izokatu::Openssl::PrivateKey::Auth::Encrypter
Instance Method Details
#initialize_auth_ccm_encrypter_params! ⇒ Object (private)
Set length for iv and auth_tag before their initialization
30 31 32 33 |
# File 'lib/izokatu/openssl/private_key/auth/ccm/encrypter.rb', line 30 def initialize_auth_ccm_encrypter_params! encrypter.iv_len = DEFAULT_CCM_IV_LENGTH encrypter.auth_tag_len = DEFAULT_CCM_AUTH_TAG_LENGTH end |
#initialize_auth_encrypter_params!(auth_data) ⇒ Object (private)
Initializing encrypter auth params
39 40 41 42 |
# File 'lib/izokatu/openssl/private_key/auth/ccm/encrypter.rb', line 39 def initialize_auth_encrypter_params!(auth_data) super end |
#initialize_encrypter_params! ⇒ Object (private)
Initializing encrypter params
21 22 23 24 |
# File 'lib/izokatu/openssl/private_key/auth/ccm/encrypter.rb', line 21 def initialize_encrypter_params! initialize_auth_ccm_encrypter_params! super end |
#initialize_static_message_length! ⇒ Object (private)
Initializing message length for cipher in CCM mode
48 49 50 |
# File 'lib/izokatu/openssl/private_key/auth/ccm/encrypter.rb', line 48 def encrypter.ccm_data_len = clear_data.length unless cipher.include?('ARIA') end |