http://en.wikipedia.org/wiki/Wabun_code
Basically, they did not use kanji, but relied on kana. Japanese doesn't use only kanji in its writing, but also the parallel katakana/hiragana syllabaries:
http://en.wikipedia.org/wiki/Kana
I assume there were rules in the Wabun code to resolve the occasional ambiguities, but otherwise Japanese doesn't really
need kanji to be intelligible for military purposes.