PHP Classes

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    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 124 This week: 1All time: 9,439 This week: 571Up
Version License PHP version Categories
imagecrypt 1.0.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.

Picture of Rafal Janisz
Name: Rafal Janisz <contact>
Classes: 3 packages by
Country: Poland Poland
Age: 36
All time rank: 415796 in Poland Poland
Week rank: 420 Up13 in Poland Poland Up

Documentation

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:124
This week:1
All time:9,439
This week:571Up