v3.0.1
encrypted_shared_preferences
このプラグインは、共有された設定をデバイスストレージに暗号化された値として保存します。
84いいね 703030日間ダウンロード140Pub ポイント
AndroidiOSWebmacOSWindowsLinux
暗号化された共有設定用のFlutterプラグイン
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
This plugin stores Shared Preferences as encrypted values. It is decrypted when retrieved. You could use this side by side with regular Shared Preferences.
EncryptedSharedPreferences encryptedSharedPreferences = EncryptedSharedPreferences();
encryptedSharedPreferences.setString('sample', 'Hello, World!').then((bool success) {
if (success) {
print('success');
} else {
print('fail');
}
});
encryptedSharedPreferences.getString('sample').then((String value) {
print(value); /// Prints Hello, World!
});
encryptedSharedPreferences.remove('sample').then((bool success) {
if (success) {
print('success');
} else {
print('fail');
}
});
/// Clears all values, including those you saved using regular Shared Preferences.
encryptedSharedPreferences.clear().then((bool success) {
if (success) {
print('success');
} else {
print('fail');
}
});
encryptedSharedPreferences.reload();
/// You can pass a custom SharedPreferences instance (e.g. A newer version of SharedPreferences)
final prefs = await SharedPreferences.getInstance();
EncryptedSharedPreferences encryptedSharedPreferences = EncryptedSharedPreferences(prefs: prefs);
// You can access the internal SharedPreferences instance to invoke methods not exposed by regular EncryptedSharedPreferences
SharedPreferences instance = await encryptedSharedPreferences.getInstance();
int counter = 1;
/// Access SharedPreferences' setInt method
await instance.setInt('counter', counter);
Default mode is SIC AESMode.sic, you can override it using the mode named parameter:
EncryptedSharedPreferences encryptedSharedPreferences = EncryptedSharedPreferences(mode: AESMode.cbc);
AESMode.cbcAESMode.cfb64AESMode.ctrAESMode.ecbAESMode.ofb64GctrAESMode.ofb64AESMode.sic依存関係一覧 2 件
^5.0.1^2.0.8用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗