author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Sat, 13 Dec 2008 17:58:17 +0100 | |
changeset 25 | 6cf883f9c506 |
parent 9 | c3fecc82ade6 |
child 27 | 81a574d60c15 |
permissions | -rw-r--r-- |
/** * test/demos/crypt.c * Copyright (C) 2008 Markus Broeker */ #include <stdio.h> #include <stdlib.h> #include <string.h> int main (int argc, char **argv) { char *data; int i; if (argc != 2) { printf ("Usage: %s <str>\n", argv[0]); return EXIT_SUCCESS; } /* * Its already allocated */ data = argv[1]; for (i = 0; data[i]; i++) data[i] = data[i] + 1; printf ("EnCrypted Data: %s\n", data); for (i = 0; data[i]; i++) data[i] = data[i] - 1; printf ("DeCrypted Data: %s\n", data); return EXIT_SUCCESS; }