Login   Register  
PHP Classes

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


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: 941 Down102 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