class Chef::EncryptedDataBagItem::Decryptor::Version3Decryptor
Public Class Methods
Source
# File lib/chef/encrypted_data_bag_item/decryptor.rb, line 202 def initialize(encrypted_data, key) super assert_aead_requirements_met!(algorithm) end
Calls superclass method
Chef::EncryptedDataBagItem::Decryptor::Version1Decryptor::new
Public Instance Methods
Source
# File lib/chef/encrypted_data_bag_item/decryptor.rb, line 208 def algorithm AEAD_ALGORITHM end
Returns the used decryption algorithm
Source
# File lib/chef/encrypted_data_bag_item/decryptor.rb, line 212 def auth_tag auth_tag_b64 = @encrypted_data["auth_tag"] if auth_tag_b64.nil? raise DecryptionFailure, "Error decrypting data bag value: invalid authentication tag. Most likely the data is corrupted" end Base64.decode64(auth_tag_b64) end
Source
# File lib/chef/encrypted_data_bag_item/decryptor.rb, line 221 def openssl_decryptor @openssl_decryptor ||= begin d = super d.auth_tag = auth_tag d.auth_data = "" d end end
Calls superclass method
Chef::EncryptedDataBagItem::Decryptor::Version1Decryptor#openssl_decryptor