|
-
July 7th, 2009, 08:41 AM
#1
binary file sent from windows -> linux help needed
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|