You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: message_verifier.rb
    path of file: ./repos/aws-sdk-ruby/gems/aws-sdk-sns/lib/aws-sdk-sns
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'net/http'
require 'openssl'
require 'base64'

module Aws
  module SNS
    # A utility class that can be used to verify the authenticity
    
      def authenticate!(message_body)
        msg = Json.load(message_body)
        msg = convert_lambda_msg(msg) if is_from_lambda(msg)

        case msg['SignatureVersion']
        when '1'
          verify!(msg, sha1)
        when '2'
          verify!(msg, sha256)
        else
          error_msg = 'Invalid SignatureVersion'
          raise VerificationError, error_msg
        end