# File lib/chef/encrypted_data_bag_item/decryptor.rb, line 173 def decrypted_data validate_hmac! unless @decrypted_data super end
# File lib/chef/encrypted_data_bag_item/decryptor.rb, line 178 def validate_hmac! digest = OpenSSL::Digest::Digest.new("sha256") raw_hmac = OpenSSL::HMAC.digest(digest, key, @encrypted_data["encrypted_data"]) if candidate_hmac_matches?(raw_hmac) true else raise DecryptionFailure, "Error decrypting data bag value: invalid hmac. Most likely the provided key is incorrect" end end
Generated with the Darkfish Rdoc Generator 2.