prefs_guard 0.0.6 copy "prefs_guard: ^0.0.6" to clipboard
prefs_guard: ^0.0.6 copied to clipboard

discontinued

A data encyption package for Shared Prefrences

Prefs Guard #

Prefs Guard is a data protection wrapper for local storage (Shared Prefs). supporting both IOS & Android.

- Notice :- Use Same GuardType through out the app to get the proper result.

Prefs guard supports three types of encryption formats #

GuardType.AES #

import 'package:prefs_guard/prefsguard.dart';

final prefs = PrefsGuard(GuardType.AES);

//Storing a value in local storage 
prefs.write(key: 'hello', value: 'flutter'); //encrypts using AES encryption.

//reading a value from local storage
final data= await prefs.read(key: 'hello');//decrypt using AES 

GuardType.Salsa20 #

import 'package:prefs_guard/prefsguard.dart';

final prefs = PrefsGuard(GuardType.Salsa20);

//Storing a value in local storage 
prefs.write(key: 'hello', value: 'flutter'); //encrypts using Salsa20 encryption.

//reading a value from local storage
final data= await prefs.read(key: 'hello');//decrypt using Salsa20 

GuardType.FerNet #

import 'package:prefs_guard/prefsguard.dart';

final prefs = PrefsGuard(GuardType.FerNet);

//Storing a value in local storage 
prefs.write(key: 'hello', value: 'flutter'); //encrypts using FerNet encryption.

//reading a value from local storage
final data= await prefs.read(key: 'hello');//decrypt using FerNet 

Clearing Prefs #

final prefs = PrefsGuard(GuardType.FerNet);
prefs.clearAll();

Contributing #

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update the tests as appropriate.

License #

MIT

11
likes
20
pub points
0%
popularity

Publisher

unverified uploader

A data encyption package for Shared Prefrences

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

encrypt, flutter, shared_preferences

More

Packages that depend on prefs_guard