-
Notifications
You must be signed in to change notification settings - Fork 4
Uint8List Usage
Efra Espada edited this page May 1, 2021
·
3 revisions
var file = File("file/path");
Uint8List original = file.readAsBytesSync();
Uint8List obfuscated = Stringcare.obfuscateData(original);
file.writeAsBytesSync(obfuscated);
Uint8List revealed = Stringcare.revealData(obfuscated);
file.writeAsBytesSync(revealed);
With extensions:
var file = File("file/path");
var original = file.readAsBytesSync();
var obfuscated = original.obfuscateData();
file.writeAsBytesSync(obfuscated);
var revealed = obfuscated.revealData();
file.writeAsBytesSync(revealed);
String p1 = "dsgfjkbndsgfbldsgbdjns";
String p2 = "sfvsfdgvsdfvsfdvsfvsrf";
String p3 = "dtlbkjdnsfvsftrglbjknd";
var file = File("file/path");
Uint8List original = file.readAsBytesSync();
Uint8List obfuscated = Stringcare.obfuscateDataWith([p2, p1, p3], original);
file.writeAsBytesSync(obfuscated);
Uint8List revealed = Stringcare.revealDataWith([p1, p3, p2], obfuscated);
file.writeAsBytesSync(revealed);
With extensions:
var p1 = "dsgfjkbndsgfbldsgbdjns";
var p2 = "sfvsfdgvsdfvsfdvsfvsrf";
var p3 = "dtlbkjdnsfvsftrglbjknd";
var file = File("file/path");
var original = file.readAsBytesSync();
var obfuscated = original.obfuscateDataWith([p2, p1, p3]);
file.writeAsBytesSync(obfuscated);
var revealed = obfuscated.revealDataWith([p1, p3, p2]);
file.writeAsBytesSync(revealed);