Hi guys
i have recently begun exploring encryption and came across XOR though i have attempted to understand it and implement it in reading files and then encrypting it but i cannot understand the decryption process of it at all and keep getting confused
srand(time(NULL));
for(index=0;index<MAX;index++)
{
Matrix[index]=rand()%63000000;
KeyFile1<<Matrix[index]<<endl;
}
the actual encryption:
while((count = getc(in)) != EOF)
{
for(index=0;index<MAX;index++)
{
count = (count^Matrix[index]);
}
putc(count,out);
}
But i cant understand how to make a decryption loop for that encryption. Can someone please help me.
Thankyou.