ghost_pixel 1.0.4 copy "ghost_pixel: ^1.0.4" to clipboard
ghost_pixel: ^1.0.4 copied to clipboard

Your data remains secure as it is seamlessly embedded into the image. Even when viewing the image, no one will suspect that it contains hidden information.

example/ghost_pixel_example.dart

import 'dart:io';

import 'package:ghost_pixel/ghost_pixel.dart';

void main() async {
  final imagePath = 'yourPath.jpg';
  final filePath = 'yourPath2.txt';
  final outputImagePath = 'yourPath3.jpg';
  final extractedFilePath = 'yourPath4.txt';

  await GhostPixel.hideFileInImage(
    imagePath: imagePath,
    filePath: filePath,
    outputImagePath: outputImagePath,
  );

  await GhostPixel.extractFileFromImage(
    imagePath: outputImagePath,
    outputFilePath: extractedFilePath,
    fileSize: File(filePath).lengthSync(),
  );

  final encryptedImageBytes = await GhostPixel.hideBytesInImageBytes(
    imageBytes: await File(imagePath).readAsBytes(),
    fileBytes: await File(filePath).readAsBytes(),
  );
  File(outputImagePath).writeAsBytes(encryptedImageBytes);

  final decryptedFileBytes = await GhostPixel.extractBytesFromImageBytes(
    encryptedImageBytes: encryptedImageBytes,
    fileSize: File(filePath).readAsBytesSync().length,
  );
  File(extractedFilePath).writeAsBytes(decryptedFileBytes);
}
3
likes
0
points
44
downloads

Publisher

verified publisheranykeylib.ru

Weekly Downloads

Your data remains secure as it is seamlessly embedded into the image. Even when viewing the image, no one will suspect that it contains hidden information.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

image

More

Packages that depend on ghost_pixel