Skip to main content

secure_local_key_value_storage 1.3.0 copy "secure_local_key_value_storage: ^1.3.0" to clipboard
secure_local_key_value_storage: ^1.3.0 copied to clipboard

Secure, encrypted local storage for performance and high based security with argon2 and chacha20.

example/example.dart

import 'dart:io';
import 'package:secure_local_key_value_storage/secure_local_key_value_storage.dart';

void main() async {
  Directory tempDir = await Directory.systemTemp.createTemp('local_data_test');
  File testFile = File('${tempDir.path}/test_storage.cipherjson');

  SecureLocalKeyValueStorage localKeyValueStorage =
      SecureLocalKeyValueStorage(sourceFile: testFile, key: "Hello World");
  localKeyValueStorage.readFromFile();

  localKeyValueStorage.put('test_key', 'test_value');
  localKeyValueStorage.put('gravity on earth', 9.81);
  localKeyValueStorage.put('are angels by our side', true);
  localKeyValueStorage.put(
      'Is there life on other planets besides earth???', true);
  localKeyValueStorage.put('The current year', 2026);
  localKeyValueStorage.saveToFile();

  print((localKeyValueStorage.get('The current year') *
                  localKeyValueStorage.get('gravity on earth') -
              5.06) /
          10 +
      9000.654321);
}
0
likes
160
points
392
downloads

Documentation

API reference

Publisher

verified publisherlocality.media

Weekly Downloads

Secure, encrypted local storage for performance and high based security with argon2 and chacha20.

Repository

License

BSD-3-Clause (license)

Dependencies

argon2_web, crypto, m511chacha20, theory

More

Packages that depend on secure_local_key_value_storage