def is_hex_digits(entry, count):
  """
  Checks if a string is the given number of hex digits. Digits represented by
  letters are case insensitive.

  :param str entry: string to be checked
  :param int count: number of hex digits to be checked for

  :returns: **True** if the given number of hex digits, **False** otherwise
  """

  try:
    if len(entry) != count:
      return False

    int(entry, 16)  # attempt to convert it as hex
    return True
  except (ValueError, TypeError):
    return False