packfile_password man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

packfile_password(3)		Allegro manual		  packfile_password(3)

NAME
       packfile_password  -  Sets  the global I/O encryption password. Allegro
       game programming library.

SYNOPSIS
       #include <allegro.h>

       void packfile_password(const char *password);

DESCRIPTION
       Sets the encryption password to be used for all	read/write  operations
       on  files  opened in future using Allegro's packfile functions (whether
       they are compressed or not), including all the save,  load  and	config
       routines.  Files	 written  with	an  encryption password cannot be read
       unless the same password is selected, so be careful: if you forget  the
       key,  nobody  can make your data come back again! Pass NULL or an empty
       string to return to the normal, non-encrypted mode. If  you  are	 using
       this  function  to  prevent people getting access to your datafiles, be
       careful not to store an obvious copy  of	 the  password	in  your  exe‐
       cutable:	 if  there  are	 any  strings  like  "I'm the password for the
       datafile", it would be fairly easy to get access to your data :-)

       Note #1: when writing a packfile, you can change the password to	 what‐
       ever you want after opening the file, without affecting the write oper‐
       ation.  On the contrary, when writing a sub-chunk of  a	packfile,  you
       must  make  sure that the password that was active at the time the sub-
       chunk was opened is still active before closing the sub-chunk. This  is
       guaranteed  to  be true if you didn't call the packfile_password() rou‐
       tine in the meantime. Read operations,  either  on  packfiles  or  sub-
       chunks, have no such restriction.

       Note  #2:  as  explained above, the password is used for all read/write
       operations on files, including for several  functions  of  the  library
       that   operate  on  files  without  explicitly  using  packfiles	 (e.g.
       load_bitmap()).	The unencrypted mode is mandatory in order  for	 those
       functions  to work.  Therefore remember to call packfile_password(NULL)
       before using them if you previously changed the password. As a rule  of
       thumb, always call packfile_password(NULL) when you are done with oper‐
       ations on packfiles.  The only exception to this	 is  custom  packfiles
       created with pack_fopen_vtable().

SEE ALSO
       pack_fopen(3), load_datafile(3), pack_fopen_vtable(3)

Allegro				 version 4.4.2		  packfile_password(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net