Any person subject to this code who 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 by confinement of not more than ten years or such other punishment as a court-martial directs.