In Star Trek II: The Wrath of Khan, Khan and his crew have hijacked the Defiant and have raised their shields. Fortunately, Kirk and company on the Enterprise have a way to disable them.
Spock: Reliant's prefix number is one six three zero nine.
Saavik: I don't understand.
Kirk: You have to learn why things work on a starship.
Spock: Each ship has its combination code.
Kirk: To prevent an enemy do what we're attempting. Using our console to order Reliant to lower her shields.
Wouldn't this trick work both ways? What would prevent hijacked ships from disabling Starfleet ships in the same way?
If Khan knew about the prefix codes, and Kirk had raised his shields, couldn't Khan have used Reliant's computers to look up the Enterprise's prefix codes and disabled its shields?