packfile_password(3)

NAME
packfile_password

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). Files written with an encryption password cannot be read unless the same password is selected, so be careful: if you forget the key, I can't 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 executable: 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.

SEE ALSO
pack_fopen(3), load_datafile(3)