DoneEx INI-File Manager Library  API Help

  EncryptKeyValue

EncryptKeyValue function encodes original key value by user's crypto-key string and return encrypted string in encoded_str parameter.

				
int EncryptKeyValue(const long   ini_file_num, 
                    const long   section_index,
                    const long   key_index,
                    const char*  crypto_key,
                    const char** encoded_str,
                    const long   buf_size
);				

Parameters
ini_file_num
[input] INI-file number which points to the data in memory structure. This number has to be saved from the return value of the previous call CreateINI or LoadINI functions.
section_index
[input] The zero-based index of the section that is enumerated from begin of INI-file.
key_index
[input] Long integer value that specifies the key index.
crypto_key
[input] Pointer to a null-terminated string that specifies the crypto key for encode key value.
encoded_str
[output] Pointer to the pointer to a null-terminated string that specifies the encrypted string.
buf_size
[input] Long integer value that specifies size of string for encoded value.

Return Values
If succeed the EncryptKeyValue function returns zero. Otherwise it returns value not equal to zero. To get extended error information, call GetLastErr.