encrypted_shared_preferences
3.0.1, released 4 years ago by an unverified publisher
Stores shared preferences as encrypted values on device storage.
WASM-readyUnverified publisher
What it does
This plugin stores values as encrypted data using shared preferences and decrypts them automatically when retrieved. It supports custom encryption modes and passing custom shared preferences instances.
AI-written summary of version 3.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to store simple key-value pairs securely using encryption.
- You want a drop-in encrypted alternative to standard shared preferences.
Skip it when
- You require complex relational querying or large dataset storage.
- Platform-native secure keystore/keychain bindings are strictly required instead of encrypted shared preferences.
Strengths
- Easy to use with an API similar to standard shared preferences.
- Supports multiple AES encryption modes of operation.
- Allows access to the internal shared preferences instance.
Weaknesses
- License is unknown.
- Relying on shared preferences encryption might not meet strict hardware-backed secure storage requirements compared to dedicated keychain/keystore plugins.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Not documented
EncryptedSharedPreferences encryptedSharedPreferences = EncryptedSharedPreferences();
encryptedSharedPreferences.setString('sample', 'Hello, World!');
encryptedSharedPreferences.getString('sample').then((String value) {
print(value);
});Alternatives
Packages that do the same job and could replace encrypted_shared_preferences.
- flutter_secure_storage
Provides secure storage using keychain and encrypted keystore natively on supported platforms.
93Compare
Works with
Packages commonly used together with encrypted_shared_preferences: ones it builds on, ones built on it, and its own family.
- shared_preferencesencrypted_shared_preferences depends on itFlutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android.
- encryptencrypted_shared_preferences depends on itHigh‑level Dart APIs for encryption, decryption, signing and secure random generation.