boxx 0.1.2 copy "boxx: ^0.1.2" to clipboard
boxx: ^0.1.2 copied to clipboard

Boxx is your ultimate key-value storage plugin with built-in encryption

example/README.md

Example of usage boxx #

Storage Without Encryption

late Boxx box;

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  initBox();
}



initBox() {
  box = Boxx(mode: EncryptionMode.none);
}

Storage With Encryption

late Boxx box;

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await initBox();
}



initBox() {
  box = Boxx(mode: EncryptionMode.aes,encryptionKey: 'xxxxxxxx');
}

Usage #

Delete

    box.boxx.delete('UserData');

Get

 final contents = await box.boxx.get('UserData');

Put

box.boxx.put('UserData', response.body);

AES encrption

  String t1 = box.aes.encryptAES('Hello World', box.encryptionKey!);
  debugPrint(t1);
  String t2 = box.aes.decryptAES(t1, box.encryptionKey!);
  debugPrint(t2);

Fernet encryption

  String t3 = box.fernet.encryptFernet('Hello World', box.encryptionKey!);
  debugPrint(t3);
  String t4 = box.fernet.decryptFernet(t1, box.encryptionKey!);
  debugPrint(t4);
2
likes
0
points
139
downloads

Publisher

verified publisherworkforceanalytics.co.za

Weekly Downloads

Boxx is your ultimate key-value storage plugin with built-in encryption

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

encrypt, flutter, indexed_db, path_provider, web

More

Packages that depend on boxx