Re: Encryption failing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> ------------------------------------
> if ($EorD == "D") {
>        $text_out = mdecrypt_generic($cypher,$text);
>        $text = base64_decode($text);

shouldn't this be base64_decode($text_out) ? :)

> } else {
>        $text= base64_encode($text);
>        $text_out = mcrypt_generic($cypher,$text);

reverse these... make sure $text is setup right

> } // endif ($EorD == "D")

if you want to use this via cookies, GET, POST, etc. i would

encrypt
base64 encode

to decrypt:

string replace " " to "+"
base64 decode
then decrypt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux