To use the encryption functionality, you must include the free OpenSSL plugin provided by Corona in your build.settings plugins section:


plugins =
    ["plugin.openssl"] =
        publisherId = "com.coronalabs",


Enabling Encryption

Enabling encryption will encrypt the score values in the storage file in which they are saved.

Once you enter encryption mode you can not go back to unencrypted scores unless you delete the storage file using the flush API method.

To enable encryption, pass true when initializing the ScoreKeeper object. See also new.



local ScoreKeeper = require("plugin.scorekeeper")
local Scores = -- enable encryption


local Scores = require("plugin.scorekeeper").new(true)