Possible Duplicate:
Two-way encryption in PHP
I need a PHP script that encrypts a variable with password. I don't mean hash like md5($var); or sha1($var);
I need a script that could make (for example) md5($var); hash but also get from md5($var); the useful string.
Expectation like
$password = "SomePassword";
$data = "TheVerySecretString";
$encrypted = TheEncyptionFunctionINeed($password, $data); // Output some useless strings
$decrypted = TheDecryptionFunctionINeed($password, $data); // Output: "TheVerySecretString"