Skip to content

A package for encrypted shared preferences

License

Notifications You must be signed in to change notification settings

tchigher/prefs_guard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 
pres.write(key: 'hello', value: 'flutter'); //encrypts using AES encryption.

//reading a value from local storage
final data= await pres.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 
pres.write(key: 'hello', value: 'flutter'); //encrypts using Salsa20 encryption.

//reading a value from local storage
final data= await pres.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 
pres.write(key: 'hello', value: 'flutter'); //encrypts using FerNet encryption.

//reading a value from local storage
final data= await pres.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

About

A package for encrypted shared preferences

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 60.6%
  • Ruby 31.6%
  • Kotlin 3.8%
  • Swift 3.7%
  • Objective-C 0.3%