vyuh_plugin_storage_secure 1.2.0 copy "vyuh_plugin_storage_secure: ^1.2.0" to clipboard
vyuh_plugin_storage_secure: ^1.2.0 copied to clipboard

A secure storage plugin for Vyuh using flutter_secure_storage for encrypted data storage across platforms

Vyuh Logo

Vyuh Secure Storage Plugin

Secure Storage Plugin for Vyuh Framework using flutter_secure_storage

Docs | Website

Vyuh Secure Storage Plugin 🔐 #

vyuh_plugin_storage_secure

A secure storage plugin for the Vyuh framework that provides encrypted key-value storage for sensitive information using platform-specific secure storage mechanisms:

  • iOS: Keychain
  • Android: EncryptedSharedPreferences
  • Web: LocalStorage with encryption
  • macOS: Keychain
  • Linux: Secret Service API
  • Windows: Windows Credential Manager

Features ✨ #

  • Platform-specific Secure Storage 🛡️: Uses the most secure storage mechanism available on each platform
  • Encrypted Data 🔒: All data is encrypted before storage
  • Simple API 🎯: Easy-to-use key-value storage interface
  • Configurable Options ⚙️: Platform-specific configuration options for fine-tuned control
  • Null Safety ✅: Built with sound null safety

Installation 📦 #

Add this to your package's pubspec.yaml file:

dependencies:
  vyuh_plugin_storage_secure: ^1.1.0
copied to clipboard

Usage 💡 #

Basic Setup #

Configure secure storage in your Vyuh application:

import 'package:vyuh_core/vyuh_core.dart' as vyuh;
import 'package:vyuh_plugin_storage_secure/vyuh_plugin_storage_secure.dart';

void main() {
  vyuh.runApp(
    plugins: PluginDescriptor(
      secureStorage: FlutterSecureStoragePlugin(
        androidOptions: const AndroidOptions(
          encryptedSharedPreferences: true,
        ),
      ),
      // ... other plugins
    ),
    // ... other configuration
  );
}
copied to clipboard

Using the Plugin #

Access the secure storage plugin:

final storage = vyuh.platform.getPlugin<SecureStoragePlugin>();

// Store sensitive data
await storage.write('auth.token', 'your-secure-token');

// Read stored data
final token = await storage.read('auth.token');
print('Token: $token');

// Check if key exists
final hasToken = await storage.has('auth.token');
if (hasToken) {
  // Key exists
}

// Delete data
final deleted = await storage.delete('auth.token');
if (deleted) {
  // Key was successfully deleted
}
copied to clipboard

Platform-specific Configuration #

Configure platform-specific options when creating the plugin:

void main() {
  vyuh.runApp(
    plugins: PluginDescriptor(
      secureStorage: FlutterSecureStoragePlugin(
        androidOptions: const AndroidOptions(
          encryptedSharedPreferences: true,
        ),
        iOSOptions: const IOSOptions(
          accessibility: KeychainAccessibility.first_unlock,
        ),
        // ... other platform options
      ),
    ),
  );
}
copied to clipboard

Platform Support 🌍 #

Platform Storage Mechanism Encryption
Android EncryptedSharedPreferences AES-256 with CBC
iOS Keychain Hardware-backed encryption
Web LocalStorage AES encryption in memory
macOS Keychain Hardware-backed encryption
Linux Secret Service API System-provided encryption
Windows Credential Manager System-provided encryption

Contributing 🤝 #

Contributions are welcome! Please read our contributing guidelines to get started.


Made with ❤️ by Vyuh

0
likes
150
points
74
downloads

Publisher

verified publishervyuh.tech

Weekly Downloads

2024.09.08 - 2025.03.23

A secure storage plugin for Vyuh using flutter_secure_storage for encrypted data storage across platforms

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#vyuh #storage #secure #plugin

Documentation

API reference

License

unknown (license)

Dependencies

flutter, flutter_secure_storage, vyuh_core

More

Packages that depend on vyuh_plugin_storage_secure