flutter_secure_storage_windows

4.2.2

Windows implementation of flutter_secure_storage. Please use flutter_secure_storage instead of this package.

Download archive

Readme

flutter_secure_storage_windows

This is the platform-specific implementation of flutter_secure_storage for Windows.

Features

In the Windows implementation of the flutter_secure_storage plugin, sensitive data is securely stored using a combination of local file storage and the Windows Credential Manager. The storage mechanism ensures both confidentiality and integrity through encryption and controlled access.

When a key-value pair is stored, the value is encrypted using the AES-GCM (Galois/Counter Mode) encryption algorithm. The plugin generates a unique encryption key, securely managed and stored in the Windows Credential Manager. This key is used to encrypt the value, and the resulting encrypted data is saved to a file in the application's support directory. Each file is named after the key (with a .secure extension) and contains the encrypted value along with a nonce (used for AES-GCM encryption) and an authentication tag to verify the integrity of the data during decryption.

The directory for storing these files is dynamically determined based on the application's context, ensuring isolation and protection against unauthorized access. Additionally, for backward compatibility, the plugin can store and retrieve data directly from the Windows Credential Manager if needed. This hybrid approach leverages the security of encrypted local storage and the reliability of the Credential Manager, ensuring robust data protection for Flutter applications running on Windows.

Installation

Ensure the required C++ ATL libraries are installed alongside Visual Studio Build Tools.

Usage

Refer to the main flutter_secure_storage README for common usage instructions.

License

This project is licensed under the BSD 3 License. See the LICENSE file for details.

Changelog

4.2.2

Fixed deleteAll and containsKey not acquiring the mutex lock, which could cause data races under concurrent access.

4.2.1

Fix concurrent read/write operations causing data loss or a PathAccessException on Windows (issue #634).

4.2.0

Fix DPAPI FFI calls for compatibility with win32 6.0.0.

4.1.0

Upgrades deprecated member usage of win32.

4.0.0

  • This plugin requires a minimum dart sdk of 3.3.0 or higher and a minimum flutter version of 3.19.0.
  • Migrated to new analyzer and clean-up code.
  • Migrates to win32 version 5.5.4 to support Dart 3.4 / Flutter 3.22.0.

3.1.2

Reverts onCupertinoProtectedDataAvailabilityChanged and isCupertinoProtectedDataAvailable.

3.1.1

Updated flutter_secure_storage_platform_interface to latest version.

3.1.0

Fixed CompanyName and CompanyProduct on Windows are ignored when the lang-charset in the Runner.rc file is not 040904e4

3.0.0

  • Migrated to win32 package replacing C.
  • Changed PathNotFoundException to FileSystemException to be backwards compatible with Flutter SDK 2.12.0
  • Applied lint suggestions

2.1.1

Revert changes made in version 2.1.0 due to breaking changes. These changes will be republished under a new major version number 3.0.0.

2.1.0

  • Changed PathNotFoundException to FileSystemException to be backwards compatible with Flutter SDK 2.12.0
  • Applied lint suggestions

2.0.0

Write encrypted data to files instead of the windows credential system.

1.1.3

Updated flutter_secure_storage_platform_interface to latest version.

1.1.2

  • Silently ignore errors when deleting keys that don't exist

1.1.1

  • Fix application crash when key doesn't exists.

1.1.0

Features

  • Add readAll, deleteAll and containsKey functions.

Bugfixes

  • Fix implementation of delete operation to allow null value.

1.0.0

  • Initial Windows implementation

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add flutter_secure_storage_windows
pubspec.yaml
name: flutter_secure_storage_windows
description: Windows implementation of flutter_secure_storage. Please use flutter_secure_storage instead of this package.
repository: https://github.com/mogol/flutter_secure_storage
version: 4.2.2

environment:
  sdk: '>=3.3.0 <4.0.0'
  flutter: '>=3.19.0'

dependencies:
  ffi: ^2.2.0
  flutter:
    sdk: flutter
  flutter_secure_storage_platform_interface: ^2.0.0
  path: ^1.9.1
  path_provider: ^2.1.5
  path_provider_platform_interface: ^2.1.2
  win32: ^6.0.1

dev_dependencies:
  flutter_test:
    sdk: flutter
  path_provider_windows: ^2.0.0
  very_good_analysis: ^7.0.0

flutter:
  plugin:
    implements: flutter_secure_storage
    platforms:
      windows:
        pluginClass: FlutterSecureStorageWindowsPlugin
        dartPluginClass: FlutterSecureStorageWindows

Version history

VersionPublishedArchiveSHA-256
1.0.0On demandDownload0a02cf95…5f92bf
1.1.0On demandDownload2b89a7ec…16cdef
1.1.1On demandDownload753d22b9…ac5451
1.1.2On demandDownloadcf9fd49c…dc2961
1.1.3On demandDownloadca89c805…69cab5
2.0.0On demandDownloadfc2910ec…93c3ee
2.1.0On demandDownloaddd346bbd…d878a9
2.1.1On demandDownload38f9501c…b47255
3.0.0On demandDownload5809c66f…29d108
3.1.0On demandDownload583a738a…923d4a
3.1.1On demandDownload90d92332…7892c3
3.1.2On demandDownloadb20b07cb…cd3709
4.0.0On demandDownloadff32af20…df9f21
4.1.0Cached · Upstream SHA-256 matchedDownload3b7c8e06…ad1613
4.2.0On demandDownload0191ba6a…f40ce7
4.2.1On demandDownload8f42f359…3840e8
4.2.2Cached · Upstream SHA-256 matchedDownload47195181…173ec1

Dependencies

ffi "^2.2.0"

flutter { "sdk": "flutter" }

flutter_secure_storage_platform_interface "^2.0.0"

path "^1.9.1"

path_provider "^2.1.5"

path_provider_platform_interface "^2.1.2"

win32 "^6.0.1"