Tizen Native API  6.0
Eet File Ciphered Main Functions

Most of the Eet File Main Functions have alternative versions that accounts for ciphers to protect their content.

See also:
Cipher, Identity and Protection Mechanisms

Functions

void * eet_read_cipher (Eet_File *ef, const char *name, int *size_ret, const char *cipher_key)
 Reads 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)
 Writes a specified entry to an eet file handle using a cipher.

Function Documentation

void* eet_read_cipher ( Eet_File ef,
const char *  name,
int *  size_ret,
const char *  cipher_key 
)

Reads a specified entry from an eet file and return data using a cipher.

Parameters:
efA valid eet file handle opened for reading.
nameName of the entry. eg: "/base/file_i_want".
size_retNumber of bytes read from entry and returned.
cipher_keyThe key to use as cipher.
Returns:
The data stored in that entry in the eet file.

This function finds an entry in the eet file that is stored under the name specified, and returns that data, decompressed, if successful. NULL is returned if the lookup fails or if memory errors are encountered. It is the job of the calling program to call free() on the returned data. The number of bytes in the returned data chunk are placed in size_ret.

If the eet file handle is not valid NULL is returned and size_ret is filled with 0.

See also:
eet_read()
Since (EFL) :
1.0.0
Since :
3.0
int eet_write_cipher ( Eet_File ef,
const char *  name,
const void *  data,
int  size,
int  compress,
const char *  cipher_key 
)

Writes a specified entry to an eet file handle using a cipher.

Parameters:
efA valid eet file handle opened for writing.
nameName of the entry. eg: "/base/file_i_want".
dataPointer to the data to be stored.
sizeLength in bytes in the data to be stored.
compressCompression flags (1 == compress, 0 = don't compress).
cipher_keyThe key to use as cipher.
Returns:
Bytes written on successful write, 0 on failure.

This function will write the specified chunk of data to the eet file and return greater than 0 on success. 0 will be returned 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 (EFL) :
1.0.0
Since :
3.0