class Izokatu::Openssl::PrivateKey::Auth::CCM::Encrypter

OpenSSL private key encrypter for authenticated ciphers in CCM mode

Constants

DEFAULT_CCM_AUTH_TAG_LENGTH

Default authentication tag length for ciphers in CCM mode

DEFAULT_CCM_IV_LENGTH

Default iv (nonce) length for ciphers in CCM mode

Private Instance Methods

initialize_auth_ccm_encrypter_params!() click to toggle source

Set length for iv and auth_tag before their initialization

@since 0.1.0

# 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) click to toggle source

Initializing encrypter auth params

@since 0.1.0

# File lib/izokatu/openssl/private_key/auth/ccm/encrypter.rb, line 39
def initialize_auth_encrypter_params!(auth_data)
  initialize_static_message_length!
  super
end
initialize_encrypter_params!() click to toggle source

Initializing encrypter params

@since 0.1.0

# 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!() click to toggle source

Initializing message length for cipher in CCM mode

@since 0.1.0

# File lib/izokatu/openssl/private_key/auth/ccm/encrypter.rb, line 48
def initialize_static_message_length!
  encrypter.ccm_data_len = clear_data.length unless cipher.include?('ARIA')
end