boxx 0.1.2
boxx: ^0.1.2 copied to clipboard
Boxx is your ultimate key-value storage plugin with built-in encryption
Store, retrieve, and protect your data effortlessly with AES or Fernet encryption. Whether you need blazing-fast key-value storage or encrption Boxx has you covered.
Features #
Boxx is a lightweight storage solution with optional encryption built in. Its simple, powerful, & intuitive API get's you up and running in no time.
✅ Simple – Easy-to-use key-value interface ✅ Secure – Choose between AES-256 or Fernet encryption ✅ Versatile – Perfect for configs, secrets, or sensitive data
Getting started #
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();
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);
Additional information #
Box supports 2 Encryption Algorithms 1) AES Algorithms 2) Fernet Algorithms