I have an override of readReplyFromWebserver (from juce_OnlineUnlockStatus). It reads the reply from the webserver and then uses Blowfish to encrypt the response (in the HeapBlock buffer) and then writes this to file. This works perfectly on OSX, however it fails miserably on Windows. What could I be doing wrong?
// Encrypt (
// contentLength is taken from stream->getTotalLength(); as in the readReplyFromWebserver function.
// bufferSize is 0x8000 (or 32768 in int)
const String encryptionKey = "123";
BlowFish bf (encryptionKey.toUTF8(), (int) encryptionKey.getNumBytesAsUTF8());
bf.encrypt(buffer.get(), contentLength, bufferSize);
// Write encrypted buffer to file
outStream.setPosition (0);
outStream.truncate();
outStream.write(buffer.get(), contentLength);