Any person subject to this code who in time of war discloses the parole or countersign to any person not entitled to receive it, or who gives to another who is entitled to receive and use the parole or countersign a different parole or countersign from that which, to his or her knowledge, he or she was authorized and required to give, shall be punished as a court martial may direct.