simple_storage_plugin

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

simple storage plugin

simple_storage_plugin #
A plugin for storing data using shared preferences in Android. It is highly dependent on simple_signing_plugin. Stored data is encrypted using AES. In order for the package to function properly, it is required to protect a device with a screen lock.
Features #
This plugin contains following methods:

writeData - saves user's input and key into shared preferences. Authentication is required to perform this action.
readData - reads data from shared preferences saved under input key. If no data under such key is present, an exception is thrown.
deleteData - deletes data from shared preferences saved under input key.
editData - edits data in shared preferences saved under input key. Authentication is required to perform this action.

Usage #
//Writing data example
String _data = 'Data';
String _key = 'Key';
var result = await SimpleStoragePlugin.writeData(_key, _data); //returns true if everything goes fine. Can throw a SharedPreferencesException or DeviceNotSecuredException
copied to clipboard
//Reading data example
String _key = 'Key';
var result = await SimpleStoragePlugin.readData(_key); //returns data written under key if everything goes fine. Can throw a InvalidSignatureException, DeviceNotSecuredException or NoKeyInStorageException
copied to clipboard
//Deleting data example
String _key = 'Key';
var result = await SimpleStoragePlugin.deleteData(_key); //returns true if everything goes fine. Can throw a SharedPreferencesException or DeviceNotSecuredException
copied to clipboard
//Editing data example
String _data = 'Data';
String _key = 'Key';
var result = await SimpleStoragePlugin.editData(_key, _data); //returns true if everything goes fine. Can throw a SharedPreferencesException or DeviceNotSecuredException
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.