Re: [AD] docs patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2002-06-30, Eric <ebotcazou@xxxxxxxxxx> wrote:
> 
>  Better still, don't touch this function at all. Ever.
> 
> !??? Just a few lines above: "Files written with an encryption password cannot be read
> unless the same password is selected". How can I open my encrypted datafiles without
> using this function ?

Attached is a version that is very slightly less condescending ;-)
I'm not sure I understand the part about encrypted chunks though.

-- 
王浩禎
Index: allegro._tx
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/allegro._tx,v
retrieving revision 1.21.2.8
diff -u -r1.21.2.8 allegro._tx
--- allegro._tx	30 Jun 2002 17:24:15 -0000	1.21.2.8
+++ allegro._tx	1 Jul 2002 01:42:41 -0000
@@ -5875,9 +5875,20 @@
    if there are any strings like "I'm the password for the datafile", it
    would be fairly easy to get access to your data :-)
 
-   Important: as soon as you have opened a file using an encryption
-   password, call packfile_password(NULL) again. Better still, don't touch
-   this function at all. Ever.
+   Important: as soon as you are finished reading or writing a file using an
+   encryption password, please remember to call packfile_password(NULL) again
+   to return to unencrypted mode.
+
+   If you are using encrypted chunks, you must restore the password that was
+   active at the time the chunk was opened _before_ closing the chunk. After
+   the chunk is closed, you can call packfile_password(NULL) again.
+
+   Personal bias: IMHO this function is rather badly thought out. It affects
+   absolutely _all_ future packfile operations, including packfiles that are
+   implicitly opened by Allegro, e.g. during a call to load_bitmap(). My
+   advice is to not touch this function if you can avoid it. If you wish to
+   obfuscate game data so that curious people will not accidentally see
+   spoilers, may I recommend good old ROT-13?
 
 @@PACKFILE *@pack_fopen(const char *filename, const char *mode);
 @xref packfile functions, pack_fopen_chunk, packfile_password


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/