debian man page for packfile_password

Query: packfile_password

OS: debian

Section: 3alleg4

Links: debian man pages   all man pages

Forums: unix linux community   forum categories

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

packfile_password(3alleg4)					  Allegro manual					packfile_password(3alleg4)

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 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 :-) Note #1: when writing a packfile, you can change the password to whatever you want after opening the file, without affecting the write operation. 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() routine 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 func- tions 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 operations on packfiles. The only exception to this is custom packfiles created with pack_fopen_vtable().
SEE ALSO
pack_fopen(3alleg4), load_datafile(3alleg4), pack_fopen_vtable(3alleg4) Allegro version 4.4.2 packfile_password(3alleg4)
Related Man Pages
pack_fopen(3alleg4) - debian
pack_fopen(3alleg4) - suse
packfile_password(3alleg4) - opendarwin
packfile_password(3alleg4) - plan9
packfile_password(3alleg4) - mojave
Similar Topics in the Unix Linux Community
no encryption type specified
Cryptomfs 1.0
BSD channel launched on YouTube
FreeBSD 7.1-RC1 Available
Saving an unencrypted copy of a file encrypted with vi