A ROT cipher (and decipher) in C. Reads input from STDIN and writes to STDOUT. It (de)ciphers characters from space (0x20) to ~ (0x7E).
Usage:
rot [-c | -d] [-r number] < STDIN > STDOUT
-c
- ciphers the input-d
- deciphers the input-n number
- how many characters to shift
Compile tests with make test
and run ./test
. If all goes well, it'll say "Tests OK!". If not, it'll greet you with assertion failures.
See the LICENSE file for license rights and limitations (MIT).