ds_map_secure_save

This function will save the given ds_map to a secure location on the target platform.

Syntax:

ds_map_secure_save(map, filename);


Argument Description
map The id of the data structure to use
filename The name of the file to save the map to


Returns: Boolean


Description

This function will save the contents of the given ds_map to a file. The file itself can have almost any extension (for example, *.dat, *.json, *.bin, etc...) and will be encrypted and stored to a safe location on the target platform. In this way you can store sensitive information, like in-app purchase details or passwords, locally in a secure way. You can then re-load the ds_map using the function ds_map_secure_load(). Note that if the DS map being saved contains an array, this array will be converted into a DS list instead when saved.

IMPORTANT! The secure saved DS map file can only be loaded on the device that created it, and if you try to load a file that was saved on a different device, then it will not work.


Example:

ds_map_secure_save(purchase_map, "p_data.dat");

The above code will save the ds_map indexed in the variable "p_data" to the given file for later retrieval.


Back: DS Maps
Next: ds_map_secure_save_buffer
© Copyright YoYo Games Ltd. 2018 All Rights Reserved