How can I make this more efficient?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
ifstream ptext ("ptext.txt",ios::binary);
ofstream enc ("encrypted.txt",ios::binary);
string result(15, '\0');
ptext.read(&result[0], 15);
result.resize(ptext.gcount());
encrypt(result,keysched,encryptedblock);
for (int a=0;a<4;a++)
for (int b=0;b<4;b++)
enc << encryptedblock[b][a];
|
How efficient is this for loading in a file 15 chars at a time and then outputing a 2d array to another file?
Last edited on
Topic archived. No new replies allowed.