// Input the plaintext in the array
char d;
string temp;
ifstream myfile1 ("Plaintext.txt");
if (myfile1.is_open())
{ do
{
for ( j=0; j<BC; j++) // BC=4
for ( i=0; i < 4; i++)
{ myfile1.get(d);
a[i][j] = d; // plaintext
}
Encrypt(a, rk);
/*
strcpy(temp,a);
// Code to write to the file
*/
// Now i have to save the encrypted text in a file but with all the text in the plaintext file i.e //the file has more than 16 bytes.. One method to do this is save the 16 bytes encrypted //text as a string but saving consecutive 16 bytes till end of file..
}while(!myfile1.eof());
myfile1.close();
}
else
cout << "Unable to open file";
Can anyone help me how to change the code so that it can copy the encrypted text consecutively till the end of the file..