2015-08-08 21:11:07

Hi,
I do it like this:

file_encrypt("data.dat","data.dat","data");
But it doesn't work for some reason.
I post sounds I record to freesound. Click here to visit my freesound page
I usually post game recordings to anyaudio. Click here to visit my anyaudio page

2015-08-10 17:23:41

Burak, could you give some details?
what happens when the function is called? does it spawn a compiler error? Or does the file simply not encrypt?

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2015-08-10 17:31:11

Hi, it doesn't encrpyt at all not a compilation error.

I post sounds I record to freesound. Click here to visit my freesound page
I usually post game recordings to anyaudio. Click here to visit my anyaudio page

2015-08-10 18:04:23

file_encrypt("data.dat", "data1.dat", "key");
file_copy("data1.dat", "data.dat", true);
file_delete("data1.dat");
That's how you'd do it with data.dat, or you could make data1.dat be unencrypted saving you from copying an extra file. But your problem is that the files don't overwrite each other. You could also use string_encrypt which would work just as well, and would quite litterily be easier to restore the data, asuming you arn't working with like a sound file. If you are, do file, if not, string does the trick nicely, like this.
file f;
f.open("data.dat", "rb");
string data=string_encrypt(f.read(), "key");
f.close();
f.open("data.dat", "wb");
f.write(data);
f.close();


I wrote that in a hurry so please forgive any compolation errors, however I hope it helps.

I am a web designer, and a game developer. If you wish see me at http://www.samtupy.com