Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int decrypt(int key){
- int c, i;
- char newc;
- printf("%d",key);
- FILE *file, *fp;
- file = fopen("mystery01.txt", "r");
- fp = fopen ("decrypt.txt", "w+");
- if (file == NULL){
- return 0;
- }
- while((c = fgetc(file)) != EOF){
- c = c - key;
- while (c < 0){
- c +=256;
- if (c > 0){
- break;
- }
- }
- fputc(c, fp);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement