basic encryption of flag/data help

So I have an app in which the user has the option to remove the ads.

Basically I just switch the flag to true and save it in as text in a table on the device.

Works fine but I got to thinking it isnt very secure in any way. :unsure:

What is the best way to encrypt the flag/data in the stored table ?

I am unsure which is the best way to move forward ?

thank you

OpenSSL plugin

thanks, I wasnt sure about openSSL as I have little understanding of.

I have some more questions .

I am not sure how to integrate it into my code, I obviously have the build settings updated and required the relevant libraries as described in the api docs.

HOw do I integrate it with my code below? This is how I load in the table with the value of either true or false

[lua]

– main.lua–

_G.storageTable = {}
_G.removeAllAds = storageTable.removeAds

if( io.exists( “saveFile.txt”, system.DocumentsDirectory ) ) then
   – File exists, read it in
    storageTable = table.load( “saveFile.txt”, system.DocumentsDirectory )
else
   – file does not exist, setup default table with setting(s)
   storageTable.removeAds = false
   table.save( storageTable, “saveFile.txt”, system.DocumentsDirectory )

end

function _G.removeTheAds()
    storageTable.removeAds = true
    table.save( storageTable, “saveFile.txt”, system.DocumentsDirectory )

end

–ad removal function–

revmobAds = function ()

     _G.removeAllAds = storageTable.removeAds
     if _G.removeAllAds == true  then

      runGame()

      else

     

     playtheAds()

[/lua]

OpenSSL plugin

thanks, I wasnt sure about openSSL as I have little understanding of.

I have some more questions .

I am not sure how to integrate it into my code, I obviously have the build settings updated and required the relevant libraries as described in the api docs.

HOw do I integrate it with my code below? This is how I load in the table with the value of either true or false

[lua]

– main.lua–

_G.storageTable = {}
_G.removeAllAds = storageTable.removeAds

if( io.exists( “saveFile.txt”, system.DocumentsDirectory ) ) then
   – File exists, read it in
    storageTable = table.load( “saveFile.txt”, system.DocumentsDirectory )
else
   – file does not exist, setup default table with setting(s)
   storageTable.removeAds = false
   table.save( storageTable, “saveFile.txt”, system.DocumentsDirectory )

end

function _G.removeTheAds()
    storageTable.removeAds = true
    table.save( storageTable, “saveFile.txt”, system.DocumentsDirectory )

end

–ad removal function–

revmobAds = function ()

     _G.removeAllAds = storageTable.removeAds
     if _G.removeAllAds == true  then

      runGame()

      else

     

     playtheAds()

[/lua]