sentc_flutter_secure_storage 0.8.0 copy "sentc_flutter_secure_storage: ^0.8.0" to clipboard
sentc_flutter_secure_storage: ^0.8.0 copied to clipboard

Using flutter secure storage for sentc. This plugin provides an alternative storage implementation.

sentc_flutter_secure_storage #

This plugin uses the flutter secure storage to securely store the keys on the native device.

To change the storage, just set the storage option in the init function.

import 'package:sentc/sentc.dart';
import 'package:sentc_flutter_secure_storage/sentc_flutter_secure_storage.dart';

void main() async {
  
  await Sentc.init(
    appToken: "5zMb6zs3dEM62n+FxjBilFPp+j9e7YUFA+7pi6Hi",
    storage: SecureStorage(), //init with the other storage
  );
}

To install and configure the storage please follow the flutter_secure_storage instructions.

You can also pre configure the storage and set it then to sentc. This is useful if you need to set other options for the storage.

import 'package:sentc/sentc.dart';
import 'package:sentc_flutter_secure_storage/sentc_flutter_secure_storage.dart';

void main() async {

  //set other android option to use android encryptedSharedPreferences (only for Android >= V5)
  AndroidOptions getAndroidOptions() => const AndroidOptions(
    encryptedSharedPreferences: true,
  );

  final storage = FlutterSecureStorage(aOptions: getAndroidOptions());
  
  await Sentc.init(
    appToken: "5zMb6zs3dEM62n+FxjBilFPp+j9e7YUFA+7pi6Hi",
    storage: SecureStorage(storage), //set the storage with options
  );
}
1
likes
150
points
26
downloads

Publisher

unverified uploader

Weekly Downloads

Using flutter secure storage for sentc. This plugin provides an alternative storage implementation.

Homepage
Repository (GitHub)

Topics

#crypto #sdk #sentc #encryption

Documentation

Documentation
API reference

License

AGPL-3.0 (license)

Dependencies

flutter, flutter_secure_storage, flutter_web_plugins, plugin_platform_interface, sentc

More

Packages that depend on sentc_flutter_secure_storage