datacapsule 1.0.0 datacapsule: ^1.0.0 copied to clipboard
A simple string (only) masking algorithm that hides a readable string value inside a data capsule using a generated key. Generated data capsules will only be opened using the same key that was used to [...]
Data Capsule #
A simple string (only) masking algorithm that hides a readable string value inside a data capsule using a generated key. Generated data capsules will only be opened using the same key that was used to create them.
Setup #
To use this plugin:
Add data capsule in your project's pubspec.yaml
dependencies:
datacapsule: ^1.0.0
Usage #
See the `example` directory for a complete sample code on using data capsule.
Import it inside your code
import 'package:datacapsule/datacapsule.dart';
Instantiate the data capsule class
DataCapsule _capsule = DataCapsule();
There are 5 methods you can use to pack and unpack data capsules
precription(); // Gets a prescription key. As much as possible, you have to keep this somewhere safe.
pack(String data, String prescription); // Packs a string into a data capsule.
unpack(String data, String prescription); // Unpacks a string into a data capsule.
packList(List<String> data, String prescription); // Packs a list of strings into a data capsule.
unpackList(List<String> data, String prescription); // Unpacks a a list strings into a data capsule.