Re: [PEPr] Comment on Encryption::Crypt_Blowfish
| From: | Alan Knowles | Date: | Tue, 08 Feb 2005 12:55:23 +0000 |
| Subject: | Re: [PEPr] Comment on Encryption::Crypt_Blowfish | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-36057@lists.php.net to get a copy of this message | ||
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+
Regards
Alan
Matthew Fonda wrote:
Matthew Fonda (http://pear.php.net/user/mfonda) has commented on the proposal for Encryption::Crypt_Blowfish. Comment: All constants are now prefixed with CRYPT_BLOWFISH_* and private methods are now prefixed with _ The @ wrapper is needed on ord, because depending on the length of the string, the offset used with ord may not exist during the last cycle through the loop. Rather than using a bunch of if statements to check if it does or not, I thought using @ to suppress warnings would work better. Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=208