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
|