class Izokatu::Openssl::PrivateKey::Auth::CCM::Decrypter
OpenSSL private key decrypter for authenticated ciphers in CCM
mode
Constants
Private Instance Methods
initialize_auth_ccm_decrypter_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/decrypter.rb, line 31 def initialize_auth_ccm_decrypter_params! decrypter.iv_len = DEFAULT_CCM_IV_LENGTH decrypter.auth_tag_len = DEFAULT_CCM_AUTH_TAG_LENGTH end
initialize_auth_decrypter_params!()
click to toggle source
Initializing decrypter auth params
@since 0.1.0
Calls superclass method
Izokatu::Openssl::PrivateKey::Auth::Decrypter#initialize_auth_decrypter_params!
# File lib/izokatu/openssl/private_key/auth/ccm/decrypter.rb, line 40 def initialize_auth_decrypter_params! initialize_static_message_length! super end
initialize_decrypter_params!()
click to toggle source
Initializing decrypter params
@since 0.1.0
Calls superclass method
Izokatu::Openssl::PrivateKey::Auth::Decrypter#initialize_decrypter_params!
# File lib/izokatu/openssl/private_key/auth/ccm/decrypter.rb, line 22 def initialize_decrypter_params! initialize_auth_ccm_decrypter_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/decrypter.rb, line 49 def initialize_static_message_length! decrypter.ccm_data_len = encrypted_data.length unless cipher.include?('ARIA') end
verify_tag_size!()
click to toggle source
Raising exception if auth tag is truncated @note Redefined to use local auth tag length
@raise RuntimeError
@since 0.1.0
# File lib/izokatu/openssl/private_key/auth/ccm/decrypter.rb, line 59 def verify_tag_size! raise 'tag is truncated!' unless auth_tag.bytesize == DEFAULT_CCM_AUTH_TAG_LENGTH end