Eet File Ciphered Main Functions
[Eet File Main Functions]
Most of the Eet File Main Functions have alternative versions that accounts for ciphers to protect their content.
More...Functions | |
void * | eet_read_cipher (Eet_File *ef, const char *name, int *size_ret, const char *cipher_key) |
Read a specified entry from an eet file and return data using a cipher. | |
int | eet_write_cipher (Eet_File *ef, const char *name, const void *data, int size, int compress, const char *cipher_key) |
Write a specified entry to an eet file handle using a cipher. |
Detailed Description
Most of the Eet File Main Functions have alternative versions that accounts for ciphers to protect their content.
Function Documentation
void* eet_read_cipher | ( | Eet_File * | ef, | |
const char * | name, | |||
int * | size_ret, | |||
const char * | cipher_key | |||
) |
Read a specified entry from an eet file and return data using a cipher.
- Parameters:
-
ef A valid eet file handle opened for reading. name Name of the entry. eg: "/base/file_i_want". size_ret Number of bytes read from entry and returned. cipher_key The key to use as cipher.
- Returns:
- The data stored in that entry in the eet file.
If the eet file handle is not valid NULL is returned and size_ret is filled with 0.
- See also:
- eet_read()
- Since:
- 1.0.0
References EET_FILE_MODE_READ, EET_FILE_MODE_READ_WRITE, and eet_read_cipher().
Referenced by eet_data_dump_cipher(), eet_data_image_header_read_cipher(), eet_data_image_read_cipher(), eet_data_image_read_to_surface_cipher(), eet_data_node_read_cipher(), eet_data_read_cipher(), eet_read(), and eet_read_cipher().
int eet_write_cipher | ( | Eet_File * | ef, | |
const char * | name, | |||
const void * | data, | |||
int | size, | |||
int | compress, | |||
const char * | cipher_key | |||
) |
Write a specified entry to an eet file handle using a cipher.
- Parameters:
-
ef A valid eet file handle opened for writing. name Name of the entry. eg: "/base/file_i_want". data Pointer to the data to be stored. size Length in bytes in the data to be stored. compress Compression flags (1 == compress, 0 = don't compress). cipher_key The key to use as cipher.
- Returns:
- bytes written on successful write, 0 on failure.
The eet file handle must be a valid file handle for an eet file opened for writing. If it is not, 0 will be returned and no action will be performed.
Name, and data must not be NULL, and size must be > 0. If these conditions are not met, 0 will be returned.
The data will be copied (and optionally compressed) in ram, pending a flush to disk (it will stay in ram till the eet file handle is closed though).
- See also:
- eet_write()
- Since:
- 1.0.0
References EET_FILE_MODE_READ_WRITE, and EET_FILE_MODE_WRITE.
Referenced by eet_data_image_write_cipher(), eet_data_node_write_cipher(), eet_data_undump_cipher(), eet_data_write_cipher(), and eet_write().