This tool uses the next ciphers:
- Ceasar (shift 1)
- Atbash
- ROT-8
To launch ciphering CLI tool you need:
- fork this repository
- clone it to your PC
- download node.js
- using terminal start index.js with node
Usage: node index.js [options]
Options:
-c, --config mandatory option for passing ciphers configuration
-i, --input path to input file (optional)
-o, --output path to output file (optional)
There is only one mandatory option, which you need to pass in CLI. It is "-c or "--config". Without this option, you will receive an error.
Acceptable configs for ciphers:
- Ceasar encode "C1"
- Ceasar decode "C0"
- Atbash encode and decode "A"
- ROT-8 encode "R1"
- ROT-8 decode "R0"
All cipher configs should be split by dash "-".
"R1-R0-A-R0-C1" "C1-C0-A-R1-R0-A-R0-R0-C1-A"
If you pass "-i" or "--input" option and file name with a message for encoding, the tool will read this file to get input information. Otherwise, the tool will ask you to enter a message for encoding from the standard input.
If you pass "-o" or "--output" option and file name, the tool will append encoded information into the specified file. Otherwise, the tool will print your encoded message to the standard output.
Usage example:
$ node index.js -c "C1-C1-R0-A" -i "./input.txt" -o "./output.txt"
$ node index.js -c "C1-C0-A-R1-R0-A-R0-R0-C1-A" -i "./input.txt" -o "./output.txt"
$ node index.js -c "A-A-A-R1-R0-R0-R0-C1-C1-A"
$ node index.js -c "C1" -i "./input.txt"