Heck, the NVA coulda got the carrier name from the American newspapers. They could have examined the wreckage of McCain's A4 Skyhawk & probably found the panel with the ship's name stenciled on it (unless they don't do that on combat deployments). They might have had his navigation boards, too.
Another poster suggested that McCain's detractors couldn't hold out a day, week, or month under that treatment. Perhaps. But the really difficult part is NOT knowing the hour of your release. You have no future to look forward to.
Shoot, all ships, troop movements, battle plans, captures, killed and missing in action statistics, etc, were detailed daily on the traitorous lefty nightly news, NBC, CBS, ABC. Film at 11.