PHP Encryption Class

This is a very old article. It has been imported from older blogging software, and the formatting, images, etc may have been lost. Some links may be broken. Some of the information may no longer be correct. Opinions expressed in this article may no longer be held.

Here’s a simple PHP library for encoding and decoding text.

Examples:

encode($encoding, $plaintext);
echo $manager->decode($encoding, $cyphertext); // Hello world
1?>

TrivialEncoder.class.php (Highlighted source code.)