A code is a way of encrypting a message where substitutions are done at the word level. Words from a lexicon are substituted for words in the plaintext message. These words are called codewords.

Examples of these are often seen in spy movies.