iching
is an encoder/decoder with an optional substitution cipher using hexagrams from the book I Ching. It maps base64 values to I Ching hexagrams.
- CMake
- Boost >=1.66
system
program_options
$ mkdir build
$ cd build
$ cmake ..
$ make
I Ching Hexagram Encoder/Decoder
Options:
-h [ --help ] Print help messages
-e [ --encode ] arg Encode message
-d [ --decode ] arg Decode message
-s [ --substitution-cipher ] Use substitution cipher
-i [ --input ] With input file
-k [ --key ] arg Key for decoding substitution cipher
You may redirect any program output to a file by simply adding > file.extension
to any command below.
Keys for ciphers will not be printed on stdout, so this can be safely done while the key is left on your stderr.
$ ./iching -e "secret"
== =================== =================
======= ==== ==== ========= ==== ==== ==
== =================== ==== ========= ==
== ==== ========= ==== ==== ============
======= ==== ==== ============== =======
== ========= ==== ==== ==== ==== ==== ==
$ ./src/iching -ie filename.extension
== =================== =================
======= ==== ==== ========= ==== ==== ==
== =================== ==== ========= ==
== ==== ========= ==== ==== ============
======= ==== ==== ============== =======
== ========= ==== ==== ==== ==== ==== ==
$ ./iching -se "secret"
KEY: 7CTMeW+uap1nhvorbKGJf/m2Zwl9IxSPdQA3gUR4szNq0cEL6DVijXHBytOkY8F5
======= ==== ============== ==== ==== ==
======= ==== ==== ========= ==== ==== ==
== ============== ==== ==== ========= ==
== ==== ==== ========= ========= ==== ==
== ==== ==== ========= ==== ==== =======
== ==== ========= ==== ==== ============
$ ./iching -sie filename.ext > file.enc
KEY: 7CTMeW+uap1nhvorbKGJf/m2Zwl9IxSPdQA3gUR4szNq0cEL6DVijXHBytOkY8F5
$ ./iching -id filename.extension > file.ext
$ ./iching -k "7CTMeW+uap1nhvorbKGJf/m2Zwl9IxSPdQA3gUR4szNq0cEL6DVijXHBytOkY8F5" \
-id filename.extension > filename.ext