The author’s main purpose in this excerpt is to

describe a form of code writing using an example.
explain the mistakes of General Howe during the war.
entertain the reader with a humorous story of miscommunication.
argue that using a mask is the best method for sending secret messages.