PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Rafal Janisz   PHP Crypt Image   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Crypt Image
Encode message inside an image with steganography
Author: By
Last change:
Date: 4 years ago
Size: 1,197 bytes
 

Contents

Class file image Download

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