Page tree
Skip to end of metadata
Go to start of metadata

This guide explains how to store information securely without using a database.

Storing Variable

The storing variables require four parameters to work. These are;

  • key ( string ) : the key of the variable
  • value ( Object ) : the value of the variable
  • isSecure ( Boolean ) : true : secure , false : unsecure
  • clearDataOnUpdate ( Boolean ) : true: keeps data on update. It is not affected by the new versions of the application.

It is easy to use storing variables. An example usage will be as below;

SMF.setVariable("varA", "123", true, false);

Restoring Variable

The stored variables with the SMF.setVariable() method can only restored by the SMF.getVariable() method. It only requires the key parameter of the stored variable.

The code lines below shows how to restore a variable;

var getVariable = SMF.getVariable("varA");