A C++ command-line program that converts text files to and from Bacon’s cipher. Letters are represented by five-character patterns of a and b.
From the repository root, compile with a C++ compiler:
g++ -std=c++11 main.cpp -o bacon_cipherEncode a text file, then decode the result:
./bacon_cipher input.txt -bc encoded.txt
./bacon_cipher encoded.txt -e decoded.txtThe argument order is <input file> <-bc|-e> <output file>. Supply all three arguments and use different input and output paths.
A–Zanda–zshare the same codes; decoded letters are uppercase.- Encoded characters are separated by
|; spaces use/. - Unsupported characters encode as
!!!!!and decode as#.
This is an educational implementation of a historical cipher. Input is processed with fixed-size line buffers.
- main.cpp: command-line parsing, file processing, and cipher mappings.
Author: Sreeram Kondapalli