Login   Register  
PHP Classes
elePHPant
Icontem

TxtCrypt: Encrypt a file and hide it in a regular text file

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2005-03-28 (9 years ago) RSS 2.0 feedNot enough user ratingsTotal: 1,520 All time: 2,403 This week: 1,442Up
Version License Categories  
txtcrypt 1.0GNU General Public Lice...Cryptography, Text processing
Description Author  

This class can encrypt a file and insert the encrypted data into a regular text file in such way that it does not change the way the text file appears.

The encrypt algorithm is simple but it can be replaced by another more robust algorithm.

To hide the encrypted data within a text file without changing how it appears, the data is compressed, encrypted, and converted to bit stream. The bit stream is then converted to tab (0x09) and space (0x20) characters , replacing the '1's and '0's of the bit stream. The resulting tab and space character strings is then added to the end of the carrier file.

The original carrier file size is also recorded as a converted bit stream in the end of the output file. This additional piece of information is used to extract the hidden file by the class decrypt function.

Innovation Award  
PHP Programming Innovation award nominee
April 2005
Number 5
Steganography is the process of hiding information inside data.

One of the purposes of steganography is to pass an implicit message without letting the messenger be aware that it is carrying it and so prevent that he realizes that it is there and what it means.

This class implements an steganography solution based on a smart technique for hiding data within a text message by using white space characters like tabs and spaces.

Since white space does not show anything when it is printed, this technique can be very successful on the purpose of hiding arbitrary binary messages within unsuspected texts.

Manuel Lemos
Picture of Chao-Chyuan Shih
Name: Chao-Chyuan Shih <contact>
Classes: 2 packages by
Country: United States United States
Age: 62
All time rank: 73092 in United States United States
Week rank: 926 Down97 in United States United States Down
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Plain text file TxtCrypt_Class.php Class TxtClass
Accessible without login Plain text file TxtCrypt_CommandLine_Example.php Example Command Line Example
Accessible without login Plain text file TxtCrypt_Webpage_Example.php Example Webpage Example

 Version Control Unique User Downloads Download Rankings  
 0%Total:1,520All time:2,403
 This week:0This week:1,442Up