The history of codes began with the invention of writing.
Once humans could send messages through writing, they wanted to hide their contents.
They came up with different methods to make sure others could not understand the contents even if they saw it.
Especially during wars, no information was allowed to leak out.