Skip to content

Latest commit

 

History

History
88 lines (72 loc) · 2.33 KB

README.md

File metadata and controls

88 lines (72 loc) · 2.33 KB

iching

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.

Requirements

  • CMake
  • Boost >=1.66
    • system
    • program_options

Building

$ mkdir build
$ cd build
$ cmake ..
$ make

Usage

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

Encoding Text

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"
== =================== =================
======= ==== ==== ========= ==== ==== ==
== =================== ==== ========= ==
== ==== ========= ==== ==== ============
======= ==== ==== ============== =======
== ========= ==== ==== ==== ==== ==== ==

Encoding a File

$ ./src/iching -ie filename.extension
== =================== =================
======= ==== ==== ========= ==== ==== ==
== =================== ==== ========= ==
== ==== ========= ==== ==== ============
======= ==== ==== ============== =======
== ========= ==== ==== ==== ==== ==== ==

Encoding with Substitution Cipher

$ ./iching -se "secret"
KEY: 7CTMeW+uap1nhvorbKGJf/m2Zwl9IxSPdQA3gUR4szNq0cEL6DVijXHBytOkY8F5
======= ==== ============== ==== ==== ==
======= ==== ==== ========= ==== ==== ==
== ============== ==== ==== ========= ==
== ==== ==== ========= ========= ==== ==
== ==== ==== ========= ==== ==== =======
== ==== ========= ==== ==== ============

Encoding File with Substitution Cipher

$ ./iching -sie filename.ext > file.enc
KEY: 7CTMeW+uap1nhvorbKGJf/m2Zwl9IxSPdQA3gUR4szNq0cEL6DVijXHBytOkY8F5

Decoding

$ ./iching -id filename.extension > file.ext

Decoding with Substitution Cipher

$ ./iching -k "7CTMeW+uap1nhvorbKGJf/m2Zwl9IxSPdQA3gUR4szNq0cEL6DVijXHBytOkY8F5" \
           -id filename.extension > filename.ext