flutter_secure_storage_ohos 1.0.0 copy "flutter_secure_storage_ohos: ^1.0.0" to clipboard
flutter_secure_storage_ohos: ^1.0.0 copied to clipboard

Flutter Secure Storage provides API to store data in secure storage. The preferences used in ohos.

flutter_secure_storage_ohos #

A Flutter plugin to store data in secure storage:

  • AES encryption is used for Ohos. AES secret key is encrypted with RSA and RSA key is stored in preferences.
    By default following algorithms are used for AES and secret key encryption: AES/CBC/PKCS7Padding and RSA/ECB/PKCS1Padding
    You can also use other recommendation algorithms:
    AES/GCM/NoPadding and RSA/ECB/OAEPWithSHA-256AndMGF1Padding
    You can set them in Ohos options like so:
  OhosOptions _getOhosOptions() => const OhosOptions(
          ohosKeyCipherAlgorithm: OhosKeyCipherAlgorithm.RSA_ECB_OAEPwithSHA_256andMGF1Padding,
          ohosStorageCipherAlgorithm: OhosStorageCipherAlgorithm.AES_GCM_NoPadding,
      );

Usage #

dependencies:
    flutter_secure_storage_ohos: ^1.0.0

Example #

import 'package:flutter_secure_storage_ohos/flutter_secure_storage_ohos.dart';

// Create storage
final storage = new FlutterSecureStorage();

// Read value
String value = await storage.read(key: key);

// Read all values
Map<String, String> allValues = await storage.readAll();

// Delete value
await storage.delete(key: key);

// Delete all
await storage.deleteAll();

// Write value
await storage.write(key: key, value: value);

0
likes
120
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter Secure Storage provides API to store data in secure storage. The preferences used in ohos.

Repository

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_secure_storage_platform_interface, plugin_platform_interface

More

Packages that depend on flutter_secure_storage_ohos

Packages that implement flutter_secure_storage_ohos