Crypt_Blowfish encryption between to servers fail

From: Date: Thu, 28 Jul 2005 12:45:28 +0000
Subject: Crypt_Blowfish encryption between to servers fail
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20178@lists.php.net to get a copy of this message
Hope someone can shed some light on this issue. I want to encrypt data between two servers using cookies. I've been trying to use the Crypt Blowfish pear class, but I'm not able to decrypt data sent between the two servers. A simple script like this generates a base64 encoded string on server A: include 'Crypt/Blowfish.php'; $ob = new Crypt_Blowfish('test'); $o = ($ob->encrypt('blowfish')); print base64_encode($o); Then on server B, the following is executed: include 'Crypt/Blowfish.php'; $ob = new Crypt_Blowfish('test'); print $ob->decrypt(base64_decode(<output from $o on server A>)); But the output of the decrypted string is just gibberish. Also, comparing the plain output from the two servers when encrypting the same text using the same key, generates two completely different outputs. Is Blowfish not supposed to be transportable between two different systems? Seems a bit silly to only be able to decode the data on the same system it was encrypted... Server A is a Fedora #3 and Server B is a RedHat EL AS 3.0 Regards, Thomas Nilsen Linux- The Ultimate Windows Service Pack

« previous php.pear.general (#20178) next »