Re: Crypt_Blowfish artifacts after decryption

From: Date: Mon, 11 Jul 2005 20:56:24 +0000
Subject: Re: Crypt_Blowfish artifacts after decryption
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19941@lists.php.net to get a copy of this message
Graham Clarke wrote:
Hi - I'm trying to use Crypt_Blowfish. Encryption & Decryption seems to work fine. However, whne I display decrypted data in a browser there may be squares appended to the string. These are the sort of squares you see if you open a MS Word doc with a text editor. Any suggestions on how to get rid of these? Thanks Graham Hello,
Could you post an example test that causes this, I will look into it. It is possible that the returned string is longer than the original because of the padding. A simple fix for this would be to store the original string length, and pass the decrypted string through substr() with the original length. You should also be able to pass the result through trim(), but this may result in lost data depending on what your string is. If you post an example, I will look into fixing this. Thanks, --Matthew

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