Simple PHP implementation of Steganography (Hiding a hidden message within an image)
- PHP5.4+
Update your composer.json and run composer update
{
"require": {
"kzykhys/steganography": "dev-master"
}
}
<?php
require __DIR__ . '/vendor/autoload.php';
$processor = new KzykHys\Steganography\Processor();
$image = $processor->encode('/path/to/image.jpg', 'Message to hide'); // jpg|png|gif
// Save image to file
$image->write('/path/to/image.png'); // png only
// Or outout image to stdout
$image->render();
<?php
require __DIR__ . '/vendor/autoload.php';
$processor = new KzykHys\Steganography\Processor();
$message = $processor->decode('/path/to/image.png');
echo $message; // "Message to hide"
The MIT License
Kazuyuki Hayashi (@kzykhys)