The prefix code seems like a good idea, but it's only one digit longer than the security code to get into my phone. Hardly seems like the most secure method to prevent hacking. At least they gave starship computer security some thought, though....
Well, presumably the codes would be used only by Starfleet officers in an emergency situation, such as when Picard uses the Enterprise
computer to gain control of the USS Lantree
. As Starfleet is an organization that functions based on trust, it wouldn't be necessary to have lengthy security codes. But your point is well taken.