A downloadable asset pack

Buy Now$5.00 AUD or more

Fully compatible with GMS:1 and GMS:2

Securely save data on your user's devices!

Whether you are used to using INI files or are looking for a more complicated solution to encrypt data structures this extension will cater to your needs.

Features

  • Fully encrypted and unrecognizable INI files or regular data (see modes below)
  • Tamper proof mechanism ensures data cannot be changed
  • Prevents users from sharing save files & data
  • Can be used to store IAP data and much more
  • More compressed than an INI (smaller filesize)
  • Compatible with all exports
  • Option of encryption with RC4 (default) or 128-bit AES (available separately)

INI MODE To fully encrypt and make your INI files tamper-proof, all you have to do is prefix all "ini_*" functions in your project with "safe_", and change ini_open(filename) to safe_ini_open(filename, key) where key is a random string of letters that is used to encrypt your INI file. This is all that is required.

ADVANCED MODE If you need more flexibility when you are saving data, safe_save will take a ds_map and a filename and write it to the disk fully encrypted with built in tamper-proofing. It will fully save and reconstitute all embedded data structures as well.

There are examples of both modes in use included. To activate AES encryption instead of RC4 please read the Readme.txt

Sample Save File

StatusReleased
CategoryAssets
Rating
Rated 5.0 out of 5 stars
(2 total ratings)
AuthorTaylor Dale
Made withGameMaker
Tagsaes, data, encrypt, encryption, GameMaker, ini, save

Purchase

Buy Now$5.00 AUD or more

In order to download this asset pack you must purchase it at or above the minimum price of $5 AUD. You will get access to the following files:

SafeSave_1.0.3_rev3.gmez 9.8 kB

Comments

Log in with itch.io to leave a comment.

How could I use this and add a readable string of text for users that decide to poke around the files? For example, "I see you there..."

Very cool and useful asset!!! Very stable. We use it for a long time now, we had zero problems with it! One of the best assets out there!

(2 edits)

Hi!

I have some questions about RC4 encryption.

What length should I choose for RC4 key?

Is longer key better/safer?

What is your recommendation? What max RC4 key size the extension supports?

If the key is too long, can that significantly affect encryption/decription time?

Can RC4 key contain any special characters? If yes, which ones?

Thanks a lot!

hi! 

Looking at your code, I think you are stretching the key anyway to 2048 bits, is that correct? 

In that case I can set right off my key to be 2048 bits (256 characters), right?

thx

Hi!

We just realized that in GMS2 we are using your SafeSave and AES Extensions for GMS1. Is that a problem? It is strange that the version of SafeSave for GMS1 (1.0.3) is higher than the version for GMS2 (1.0.2)!
Which one should we use in GMS2? Which one is more up-to-date?
I also noticed that in the version for GMS2 the file safe_save_use_aes.gml is missing. Without that file how can I decide which encryption I want to use?

Thank you!

Hi!

Is it possible to switch between RC4 and AES on-the-fly??

In our game we have two ini files. One ini we want to encrypt with AES and another ini with RC4.

Thank you!

(1 edit)

I tried it and it is possible!

In the script safe_save_use_aes I put the key as the third argument and I check there  if the key is an array. If yes, then AES functions are returned otherwise -1.

For this in save_save.gml I had to modify the calls of safe_save_use_aes to provide the key as third argument.

:-)

It seems to work without any problems! Anything I might have missed?

Thanks!

Hi!

In safe_save_ini.gml I found this:

if (wordcount = 0) {

Shouln't be == instead of =?

How serious is this bug?

Thx
(+1)

Hi Drindilica, thanks for reporting this.

This is purely a visual bug - Gamemaker's interpreter automatically treats it as a comparison, not assignment. Feel free to change it if you like but it will function the same.

Thanks