secure_shared_preferences 0.0.3 copy "secure_shared_preferences: ^0.0.3" to clipboard
secure_shared_preferences: ^0.0.3 copied to clipboard

outdated

Simple to use yet powerful package to encypt shared preferences in android and UserDefaults in iOS.

Encryption is important

pub points Pub

Features #

  • Simple to use yet powerful package to encypt shared preferences in android and UserDefaults in iOS.
  • You have an option to by pass encryption just by passing a bool.
  • Supports String, int, bool, double, map and List<String>.
  • Uses advance AES-CBC-128 algorithm for encryption.
  • Encrypts both key and value.
  • Integration unit tests available here

Getting started #

  1. add dependency in pubspec.yaml file secure_shared_preferences:0.0.1-beta
  2. add import import 'package:secure_shared_preferences/secure_shared_preferences.dart';

Usage #

  1. To save string data type to secure storage.
    var pref = await SecureSharedPref.getInstance();
    pref.putString("Key", "This is data I want to save to local storage", true);
  1. To get string data type to secure storage.
    var pref = await SecureSharedPref.getInstance();
    pref.getString("Key", true);

Additional information #

Encryption flow chart

FlowChart

Usage

  1. Save :
    var pref = await SecureSharedPref.getInstance();
    await pref.putString("StringEncrypted", "This is my first string test", true);
    await pref.putInt("key", 100, true);
    await pref.putMap("mapKey", {"Hello":true}, true);
    await pref.putDouble("doubleKey", 20.32, true);
    await pref.putBool("boolKey", true, true);
    await pref.putStringList("listKey", ["S","K"], true);
  1. Fetch :
    var pref = await SecureSharedPref.getInstance();
    await pref.getString("StringEncrypted", true);
    await pref.getInt("key", true);
    await pref.getMap("mapKey", true);
    await pref.getDouble("doubleKey", true);
    await pref.getBool("boolKey",true);
    await pref.getStringList("listKey", true);
25
likes
140
points
1.26k
downloads

Documentation

API reference

Publisher

verified publisherflutter.pingtobuild.com

Weekly Downloads

Simple to use yet powerful package to encypt shared preferences in android and UserDefaults in iOS.

Homepage
Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

cryptography, cryptography_flutter, flutter, flutter_secure_storage, package_info, shared_preferences

More

Packages that depend on secure_shared_preferences