Public Member Functions | |
| __construct ($key='') | |
| encrypt ($string, $key='') | |
| decrypt ($string, $key='') | |
Public Attributes | |
| $key = '' | |
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
| Pluf_Crypt::__construct | ( | $ | key = '' |
) |
Construct the encryption object.
| string | The encryption key ('') |
| 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.
| string | String to encode | |
| string | Encryption key ('') |
| 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.
| string | String to decode | |
| string | Encryption key ('') |
| Pluf_Crypt::$key = '' |