Code 3 was a 23rd century Starfleet encryption protocol for use when transmitting information near unfriendly territory.
As early as stardate 3478.2 it replaced Code 2, which had been decrypted by the Romulans. In 2267, after being reminded of Code's 2's obsolescence by Nyota Uhura, Kirk amended his order to code 3.
During a competency hearing, Uhura mentioned that he had changed the order to code 3 following her reminder. (TOS: "The Deadly Years")