code: def check_encryption(encryption, tls_options = {})
        return unless encryption
  
        tls_options ||= {}
        case encryption.downcase.to_sym
        when :ssl, :simple_tls
          { method: :simple_tls, tls_options: tls_options }
        when :tls, :start_tls
          { method: :start_tls, tls_options: tls_options }
        end
      end
docs: Internal - Determine whether to use encryption or not.
  
   encryption: is the encryption method, either 'ssl', 'tls', 'simple_tls' or 'start_tls'.
   tls_options: is the options hash for tls encryption method
  
   Returns the real encryption type.