Additional Data for this Item
| demiblog:textile_body |
An update to my PHP encryption class. Despite the name, it's becoming a pretty sophisticated encyption machine. New encryption algorithms added:
* "Vigenerè cypher":http://en.wikipedia.org/wiki/Vigenere_cipher
* "One-Time Pad":http://en.wikipedia.org/wiki/One-time_pad
* "Bruce Schneier's Superencyption":http://en.wikipedia.org/wiki/Superencryption
* Various other methods using the MCrypt library
The <code class="php">TrivialEncoderManager</code> class has been obsoleted by <code class="php">TE_Machine</code>, an abstract class with several different child classes for encoding, decoding and analysis. <code class="php">TE_Machine</code> has a greatly improved parser for methods, which has made it a lot easier for me to add additional functionality such as the ability to analyse an encryption technique to see how strong it would be, and to check whether the output would be ASCII-safe. <code class="php">TrivialEncoderManager</code> is still present, but is deprecated and will be removed next release.
<!--@SUMMARY@-->
h2. Usage
====|code::php|
<?php
$trivialencoder_auto = FALSE;
include 'TrivialEncoder.class.php';
$method = 'twofish "mypassword"; xor 7; vig "ace"; base64;';
$plain_text = "Test message.\n";
$encrypted_text = TE_Machine_Encoder::Go($method, $plain_text);
$decrypted_text = TE_Machine_Decoder::Go($method, $encrypted_text);
print $decrypted_text; // prints "Test message.\n"
?>
====
h2. Download
* "TrivialEncoder.class.php":./files/TrivialEncoder.class.php ("Highlighted source code":./files/TrivialEncoder.class.phps.)
* "TE_Machine.class.php":./files/TE_Machine.class.php ("Highlighted source code":./files/TE_Machine.class.phps.) |
| status:status |
Standard |
| ov:creatorUserAgent |
dbvis/5.1.1 |
| enc:enclosure |
http://tobyinkster.co.uk/blog/2007/08/19/trivial-encoder/files/TE_Machine.class.php |
| enc:enclosure |
http://tobyinkster.co.uk/blog/2007/08/19/trivial-encoder/files/TE_Machine.class.phps |
| enc:enclosure |
http://tobyinkster.co.uk/blog/2007/08/19/trivial-encoder/files/TrivialEncoder.class.php |
| enc:enclosure |
http://tobyinkster.co.uk/blog/2007/08/19/trivial-encoder/files/TrivialEncoder.class.phps |
| dc:created |
Sun, 19 Aug 2007, 22:54:17 (UTC) |
| dc:creator |
Toby Inkster |
| dc:dateAccepted |
Sun, 19 Aug 2007, 23:02:44 (UTC) |
| dc:identifier |
182 |
| dc:issued |
Sun, 19 Aug 2007, 22:54:17 (UTC) |
| dc:language |
English (GB) |
| dc:license |
http://www.gnu.org/licenses/gpl-3.0.html |
| dc:modified |
Mon, 20 Aug 2007, 14:44:14 (UTC) |
| dc:publisher |
Toby Inkster |
| is dc:relation of |
http://tobyinkster.co.uk/blog/2007/08/19/trivial-encoder/files/TE_Machine.class.php |
| is dc:relation of |
http://tobyinkster.co.uk/blog/2007/08/19/trivial-encoder/files/TE_Machine.class.phps |
| is dc:relation of |
http://tobyinkster.co.uk/blog/2007/08/19/trivial-encoder/files/TrivialEncoder.class.php |
| is dc:relation of |
http://tobyinkster.co.uk/blog/2007/08/19/trivial-encoder/files/TrivialEncoder.class.phps |
| dc:rightsHolder |
Toby Inkster |
| dc:subject |
crypto |
| dc:subject |
php |
| dc:subject |
trivial-encoder |
| rss:link |
http://tobyinkster.co.uk/blog/2007/08/19/trivial-encoder/ |
| sioc:ip_address |
127.0.0.1 |
| is sioc:reply_of of |
http://tobyinkster.co.uk/blog/2007/08/19/trivial-encoder/#comment_1 |
| is sioc:reply_of of |
http://tobyinkster.co.uk/blog/2007/08/19/trivial-encoder/#comment_4 |
| tags:taggedWithTag |
crypto |
| tags:taggedWithTag |
php |
| tags:taggedWithTag |
trivial-encoder |
| rdf:type |
http://purl.org/rss/1.0/item |
| rdf:type |
Item |
| rdf:type |
Blog Post |
| rdf:type |
Document |
| foaf:maker |
Toby Inkster |