9
Simple data encryption
- #include <stdio.h>
- main() {
- int c, xor = '@';
- while ( (c = getchar()) != EOF )
- putchar(c^xor);
- }
$ gcc -o crypto crypto.c
$ ./crypto < crypto.c
c).#,5$%`|34$)/n ...
$ ./crypto < crypto.c | ./crypto
#include <stdio.h>
main() {
int c, xor = '@';
while ( (c = getchar()) != EOF )
putchar(c^xor);
}
Comments