Re: [PEPr] Comment on Encryption::Crypt_Blowfish
| From: | bertrand Gugger | Date: | Tue, 08 Feb 2005 13:07:20 +0000 |
| Subject: | Re: [PEPr] Comment on Encryption::Crypt_Blowfish | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-36058@lists.php.net to get a copy of this message | ||
Alan Knowles wrote:
something like this should work, A little bit extra copy and pasting, but it should get rid of the @'s $s = strlen($x); $lr = (($s > ($i+1)) ? ord($x[i+1]) : 0) << 16 + (($s > ($i+2)) ? ord($x[i+2]) : 0) << 8 + (($s > ($i+3)) ? ord($x[i+3]) : 0) << 4 + (($s > ($i+4)) ? ord($x[i+4]) : 0) << 2+ Why not:$x .= strlen($x) % 8) ? str_repeat( chr(0), 8 - (strlen($x) % 8)) : ''; and then get rid of @ on ord() ? à+ -- bertrand Gugger (toggg) >> Proposal information: >> http://pear.php.net/pepr/pepr-proposal-show.php?id=208 >