2017 © Pedro Peláez
 

library morpheus

Library to encrypt and decrypt data in colors of a picture. Process also known as steganography

image

pyrou/morpheus

Library to encrypt and decrypt data in colors of a picture. Process also known as steganography

  • Wednesday, March 14, 2018
  • by pyrou
  • Repository
  • 4 Watchers
  • 15 Stars
  • 93 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 2 Versions
  • 6 % Grown

The README.md

Morpheus (莫菲斯)

License
Code Climate, (*1)

Morpheus is a library to encrypt and decrypt data in colors of a picture. Process also known as steganography., (*2)

The project works regardless with imageMagick, GD library, or the well written intervention library., (*3)

Installing via Composer

The recommended way to install Morpheus is through Composer., (*4)

composer require pyrou/morpheus

After installing, you need to require Composer's autoloader:, (*5)

require 'vendor/autoload.php';

How to use it

With GD library, (*6)

# write data in image
$im = imagecreatefrompng("source.png");
Morpheus\Data::write("Helloworld", $im);
imagepng($im, "output.png");

# read data from image
$im = imagecreatefrompng("output.png");
assert("Helloworld" === Morpheus\Data::read($im));

With Image Magick, (*7)

# write data in image
$im = new Imagick("source.png");
Morpheus\Data::write("Helloworld", $im);
$im->writeImage("output.png");

# read data from image
$im = new Imagick("output.png");
assert("Helloworld" === Morpheus\Data::read($im));

How does it work ?

Let's explain how it works with an example. Consider this beautiful octocat., (*8)

input, (*9)

require 'vendor/autoload.php';
$im = imagecreatefrompng("source.png");
$data = base64_encode(
    "L'homme est un homme tant qu'il s'évertue ".
    "à s'élever au dessus de la nature, et cette ".
    "nature est à la fois intérieure et extérieure.");
Morpheus\Data::write($data, $im);
imagepng($im, "output.png");

Bellow is how humans and computers or perspicuous humans can see the output.png file., (*10)

source.png output.png --debug*
input output.png What library sees

In fact, the library has slightly changed the coloration of each pixels in upper-half of the file. So slightly that human eyes are NOT able to detect it., (*11)

*For understand what Morpheus did, and what he sees now., (*12)

The Versions

14/03 2018

dev-master

9999999-dev

Library to encrypt and decrypt data in colors of a picture. Process also known as steganography

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Michael Hurni

imagick imagemagick gdlib steganography image encryption data encryption

19/03 2015

1.0.0

1.0.0.0

Library to encrypt and decrypt data in colors of a picture. Process also known as steganography

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Michael Hurni

imagick imagemagick gdlib steganography image encryption data encryption