# File lib/net/ssh/verifiers/secure.rb, line 15
    def verify(arguments)
      options = arguments[:session].options
      host = options[:host_key_alias] || arguments[:session].host_as_string
      matches = Net::SSH::KnownHosts.search_for(host, arguments[:session].options)

      # We've never seen this host before, so raise an exception.
      if matches.empty?
        process_cache_miss(host, arguments, HostKeyUnknown, "is unknown")
      end

      # If we found any matches, check to see that the key type and
      # blob also match.
      found = matches.any? do |key|
        key.ssh_type == arguments[:key].ssh_type &&
        key.to_blob  == arguments[:key].to_blob
      end

      # If a match was found, return true. Otherwise, raise an exception
      # indicating that the key was not recognized.
      unless found
        process_cache_miss(host, arguments, HostKeyMismatch, "does not match")
      end

      found
    end