Skip to content
pubscout

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
$ flutter pub add encrypted_shared_preferences
Source repository

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.

Works with

Packages commonly used together with encrypted_shared_preferences: ones it builds on, ones built on it, and its own family.