boxx 0.1.6
boxx: ^0.1.6 copied to clipboard
Boxx is your ultimate key-value storage plugin with built-in encryption
Example of usage boxx
#
Without Encryption
late Boxx box;
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
initBox();
}
initBox() {
box = Boxx(mode: EncryptionMode.none);
}
With Encryption
late Boxx box;
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await initBox();
}
initBox() {
box = Boxx(mode: EncryptionMode.aes,encryptionKey: 'xxxxxxxx');
}
Usage #
Delete
box.delete('UserData');
Get
final contents = await box.get('UserData');
Put
box.put('UserData', response.body);
encrption/decryption
String t1 = box.encrypt('Hello World');
debugPrint(t1);
String t2 = box.decrypt(t1);
debugPrint(t2);