Hello,

I am sending an encrypted binary file over tcp/ip form windows to linux. When I get into linux and try to run mcrypt to decrypt the file I get "wrong key" error. I am wondering somehow if the file is being corrupted because of the different platforms? Here are some facts I do know:

1. This works with the exact same code windows->windows
2. My file where I write the binary form the tcp/ip stream looks like this:

void StringToFile(string msg, string file)
{
ofstream ofs(file.c_str(), ofstream::binary);
ofs.clear();
ofs.write(msg.data(), message.size());
ofs.close();
}

Can anyone help?

Regards,
Ellay K.