PHP Classes
elePHPant
Icontem

PHP Crypt Image: Encode message inside an image with steganography

Recommend this page to a friend!
  Info   View files Documentation   View files View files (24)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-10-09 (Yesterday) RSS 2.0 feedNot yet rated by the usersTotal: 3 This week: 3All time: 9,730 This week: 99Up
Version License PHP version Categories
imagecrypt 1.0MIT/X Consortium ...7PHP 5, Graphics, Text processing
Description Author

This class can encode message inside an image with steganography.

It can take the path of a given image file and loads it, so it can encode a given text message and store it inside the image in a way that is not easy to notice by real people. The resulting image can be saved to a new file.

The class can also read a given image file with a message stored previously in it and returns the decode message.

Name: Rafal Janisz <contact>
Classes: 1 package by
Country: Poland Poland

 

Details

imagecrypt

Build Status codecov

Steganography is the art of hiding information in plain image. This project is PHP implementation of this idea and you can hide / fetch plain text from image in bmp or png format.

Requirements

  • PHP >= 7.1
  • A GD extension
  • (optional) PHPUnit to run tests.

Install

Via Composer:

$ composer require ravjanisz/imagecrypt

Usage

// add instance
use Rav\ImageCrypt\ImageCrypt;

// pass directory and filename
$crypt = new ImageCrypt(__DIR__ . '/files', 'glass.png');
//prepare string to crypt in image
$string = 'ImageCrypt';
//crypt string and save to new file
$crypt->crypt($string, 'glassSaved.png');

//decrypt from file
$decrypt = new ImageCrypt(__DIR__ . '/files', 'glassSaved.png');
//get decrypted message or get exception
$string = $decrypt->decrypt();
echo $string;

Documentation

None

License

imagecrypt is licensed under the MIT License - see the LICENSE file for details

  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Files folder imagetests (1 directory)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file clover.xml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageImageCrypt (1 file, 3 directories)

  Files folder image Files  /  src  /  ImageCrypt  
File Role Description
Files folder imageException (1 file)
Files folder imageImage (5 files)
Files folder imageString (4 files)
  Plain text file ImageCrypt.php Class Class source

  Files folder image Files  /  src  /  ImageCrypt  /  Exception  
File Role Description
  Plain text file ImageCryptException.php Class Class source

  Files folder image Files  /  src  /  ImageCrypt  /  Image  
File Role Description
  Plain text file Image.php Class Class source
  Plain text file ImageAbstract.php Class Class source
  Plain text file ImageHelper.php Class Class source
  Plain text file ImageInterface.php Class Class source
  Plain text file Rgb.php Class Class source

  Files folder image Files  /  src  /  ImageCrypt  /  String  
File Role Description
  Plain text file BinaryConverter.php Class Class source
  Plain text file ConverterInterface.php Class Class source
  Plain text file StringConverter.php Class Class source
  Plain text file StringHelper.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageImageCrypt (1 file, 2 directories)

  Files folder image Files  /  tests  /  ImageCrypt  
File Role Description
Files folder imageImage (3 files)
Files folder imageString (3 files)
  Plain text file ImageCryptTest.php Class Class source

  Files folder image Files  /  tests  /  ImageCrypt  /  Image  
File Role Description
  Plain text file ImageHelperTest.php Class Class source
  Plain text file ImageTest.php Class Class source
  Plain text file RgbTest.php Class Class source

  Files folder image Files  /  tests  /  ImageCrypt  /  String  
File Role Description
  Plain text file BinaryConverterTest.php Class Class source
  Plain text file StringConverterTest.php Class Class source
  Plain text file StringHelperTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:3
This week:3
All time:9,730
This week:99Up