Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Can somebody help me with this ?

$
0
0

I need to write a program to encryption XOR text. I'M new to this C programa

Write an application that can XOR a given file with a given 'key'. Save the encoded (XORed) file to a new file. To see if your program works correctly, reXOR the encoded file with the same key. The original data should be recovered! So, if the key is 10 bytes of length, XOR every 10 bytes of the input fi le repeatedly with that key. Tip: Make use of the binary flag when opening the fi le with fopen();

This is what i have so far:

#include <stdio.h>
#include <stdlib.h>

int main()
{
    char Name;

    FILE *Test;
    Test =fopen("H:\\WIN2K\\Desktop\\Test.txt","rb");

    if (Test ==NULL)  // checking if it works
    {
        printf("Error!");
    }

   // fscanf(Test,"%i", Name);





    return 0;
    getch();
}


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>