Pluf_Crypt Class Reference

List of all members.

Public Member Functions

 __construct ($key='')
 encrypt ($string, $key='')
 decrypt ($string, $key='')

Public Attributes

 $key = ''


Detailed Description

Simple encryption class.

Very simple encryption class to perform simple encryption. It can be used for example when you request a valid email address to register. The validation link can contain the encrypted email.

DO NOT EVER USE IT FOR REALLY IMPORTANT DATA!!!

Credit Anonymous on http://www.php.net/mcrypt


Constructor & Destructor Documentation

Pluf_Crypt::__construct ( key = ''  ) 

Construct the encryption object.

Parameters:
string The encryption key ('')


Member Function Documentation

Pluf_Crypt::encrypt ( string,
key = '' 
)

Encrypt a string with a key.

If the key is not given, $this->key is used. If $this->key is empty an exception is raised.

Parameters:
string String to encode
string Encryption key ('')
Returns:
string Encoded string

Pluf_Crypt::decrypt ( string,
key = '' 
)

Decrypt a string with a key.

If the key is not given, $this->key is used. If $this->key is empty an exception is raised.

Parameters:
string String to decode
string Encryption key ('')
Returns:
string Decoded string


Member Data Documentation

Pluf_Crypt::$key = ''


The documentation for this class was generated from the following file:

Generated on Wed Feb 3 15:44:51 2010 for Pluf by  doxygen