class ActiveRecord::Encryption::Cipher

def decrypt(encrypted_message, key:)

+ActiveRecord::Encryption::Errors::Decryption+ if none works.
When +key+ is an Array, it will try all the keys raising a

Decrypt the provided +Message+.
def decrypt(encrypted_message, key:)
  try_to_decrypt_with_each(encrypted_message, keys: Array(key)).tap do |decrypted_text|
    decrypted_text.force_encoding(encrypted_message.headers.encoding || DEFAULT_ENCODING)
  end
end