Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » PhysFS zip and encrypt? [A5]

This thread is locked; no one can reply to it. rss feed Print
PhysFS zip and encrypt? [A5]
Hyena_
Member #8,852
July 2007
avatar

I did some research and as discussed here:
http://www.gamedev.net/topic/318218-using-physicsfs/
7 years ago, physFS had no support for opening encrypted zip files. Is it still so? I looked at A5's manual and didn't see any encrypting related commands.

I am wondering how should I implement that slight protection for my resources then. Renaming *.zip to *.dat is not good enough. However, as I have to load all my data as memory files anyway before actually using them I could encrypt each file separately and keep the zip unencrypted. Then after loading in a png for example I could invert all its bits and that would be good enough protection as there would be no password to find from exe binary as plaintext but rather the cracker should understand how the files are extracted in assembler (bit inversion for example).

SiegeLord
Member #7,827
October 2006
avatar

Hyena_ said:

However, as I have to load all my data as memory files anyway before actually using them I could encrypt each file separately and keep the zip unencrypted. Then after loading in a png for example I could invert all its bits and that would be good enough protection as there would be no password to find from exe binary as plaintext but rather the cracker should understand how the files are extracted in assembler (bit inversion for example).

You can do that. Just load the files into memory using al_fopen and al_fread, then do your decryption, mount the memory using the memfile addon and then use the _f suffixed loading functions.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Go to: