/* Copyright (C) 2016 Ben Wolsieffer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include int main(int argc, char *argv[]) { bool decrypt = false; if(argc > 1 && !strcmp(argv[1], "-d")){ decrypt = true; } setvbuf(stdout, NULL, _IONBF, 0); unsigned char i; while (true) { int ret = getc(stdin); if (ret != EOF) { i = ret; if (decrypt) { i--; } else { i++; } putc(i, stdout); } else { break; } } }