pyrou/morpheus 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pyrou/morpheus

Composer 安装命令:

composer require pyrou/morpheus

包简介

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

README 文档

README

License
Code Climate

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

The project works regardless with imageMagick, GD library, or the well written intervention library.

Installing via Composer

The recommended way to install Morpheus is through Composer.

composer require pyrou/morpheus

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';

How to use it

With GD library

# 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

# 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.

input

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.

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.

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

统计信息

  • 总下载量: 1.15k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 26
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 25
  • Watchers: 5
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固