PHP Classes

Simple PHP Cipher Encryption: Encrypt and decrypt text by mapping characters

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 72%Total: 186 All time: 8,614 This week: 157Up
Version License PHP version Categories
simple-cipher 1.0GNU General Publi...5PHP 5, Conversion


This class can encrypt and decrypt text by mapping characters.

It can take a text string and encrypt it using two text strings that define which characters should be mapped to what other characters depending on the position of the character in the string.

The class can also do the opposite, i.e. take a previously encrypted string and invert the process to recover the original string.

The key strings with the characters to be mapped are configurable.

Picture of Dave Smith
  Performance   Level  
Name: Dave Smith is available for providing paid consulting. Contact Dave Smith .
Classes: 51 packages by
Country: United States United States
Age: 58
All time rank: 618 in United States United States
Week rank: 21 Up3 in United States United States Up
Innovation award
Innovation award
Nominee: 32x

Winner: 7x

Class: simpleCipher Version: 1.0 11/17/2016 Copyright 2015 Wagon Trader, All Rights Reserved Description: This class will encrypt and decrypt text using a cipher that determines the replacement character by a mapped character and position in the message. Since the position is also considered, common words like 'the' will always be different in encrypted message. Files: simplecipher.class.php - Main class example.php - Simple application example Installation: Upload files to a web accessible location on your server (eg. public_html) Configuration: No configuration needed. If you use this in production, you will want to generate and save a new map. Simply run the following code in a script. <?php include('simplecipher.class.php'); $cipher = new simpleCipher(); echo $cipher->generateMap(true); ?> Copy the new map and use it to replace the $cipherMap variable in class. Usage: Refer to example.php file for a simple usage example. Refer to simplecipher.class.php for available methods and their usage. Changelog 1.0 Initial release
  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Usage Example
Accessible without login Plain text file license.txt Lic. License
Accessible without login Plain text file manual.txt Doc. Documentation
Plain text file simplecipher.class.php Class Main Class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,614
This week:157Up
User Ratings User Comments (2)
 All time
Great job on custom encryption.
6 years ago (Anthony Amolochitis)
Great job on custom encryption.
6 years ago (Anthony Amolochitis)