PHP Classes
elePHPant
Icontem

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    
Last Updated Ratings Unique User Downloads Download Rankings
2016-11-17 (2 years ago) RSS 2.0 feedStarStarStarStar 72%Total: 163 All time: 8,620 This week: 346Up
Version License PHP version Categories
simple-cipher 1.0GNU General Publi...5PHP 5, Conversion
Description Author

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.

  Performance   Level  
Name: Dave Smith <contact>
Classes: 47 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 29x

Winner: 6x

 

Details
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  
 0%
Total:163
This week:0
All time:8,620
This week:346Up
User Ratings User Comments (2)
 All time
Utility:91%StarStarStarStarStar
Consistency:100%StarStarStarStarStarStar
Documentation:91%StarStarStarStarStar
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:72%StarStarStarStar
Rank:270
 
Great job on custom encryption.
2 years ago (Anthony Amolochitis)
72%StarStarStarStar
Great job on custom encryption.
2 years ago (Anthony Amolochitis)
72%StarStarStarStar