Re: Encryption failing

From: Date: Wed, 16 Jan 2008 04:49:23 +0000
Subject: Re: Encryption failing
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-267356@lists.php.net to get a copy of this message
> ------------------------------------ > 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

« previous php.general (#267356) next »