v0.0.4
secure_shared_preferences
Android の SharedPreferences と iOS の UserDefaults を暗号化するための、使いやすく強力なパッケージです。
25いいね 48630日間ダウンロード140Pub ポイント
AndroidiOSmacOS
the-kool-sk/secure_shared_preferences open-source repository details.
{"sdk":"flutter"}^5.0.2^2.0.13^2.0.2^2.0.5^2.0.2{"sdk":"flutter"}^1.0.0{"sdk":"flutter"}以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
Encryption is important
bool.String, int, bool, double, map and List<String>.AES-CBC-128 algorithm for encryption. pubspec.yaml file secure_shared_preferences:0.0.4import 'package:secure_shared_preferences/secure_shared_preferences.dart'; var pref = await SecureSharedPref.getInstance();
pref.putString("Key", "This is data I want to save to local storage", isEncrypted : true);
var pref = await SecureSharedPref.getInstance();
pref.getString("Key", isEncrypted : true);
FlowChart
var pref = await SecureSharedPref.getInstance();
await pref.putString("StringEncrypted", "This is my first string test",isEncrypted: true);
await pref.putInt("key", 100, isEncrypted: true);
await pref.putMap("mapKey", {"Hello":true}, isEncrypted: true);
await pref.putDouble("doubleKey", 20.32, isEncrypted: true);
await pref.putBool("boolKey", true,isEncrypted: true);
await pref.putStringList("listKey", ["S","K"], isEncrypted: true);
First parameter is the 'key' Second parameter is the value Third parameter is whether you want to encrypt this key/value or not.
var pref = await SecureSharedPref.getInstance();
await pref.getString("StringEncrypted", isEncrypted: true);
await pref.getInt("key", isEncrypted: true);
await pref.getMap("mapKey", isEncrypted: true);
await pref.getDouble("doubleKey", isEncrypted: true);
await pref.getBool("boolKey",isEncrypted: true);
await pref.getStringList("listKey", isEncrypted: true);
First parameter is the 'key' Second parameter is whether you have encrypted this key/value or not.