PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Encryption » Crypt_Blowfish » Bug #4184

encrypt() function crash.

Details

Submitted2005-04-20 02:41 UTC
Frommike at cocoweb dot co dot uk
StatusBogus
PackageCrypt_Blowfish
PHP Version5.0.3
OSWindows XP
Roadmaps(Not assigned)

Comments

[2005-04-20 02:41 UTC] mike at cocoweb dot co dot uk

Description:
------------
The encrypt() function fails.

Reproduce code:
---------------
$BlowfishTest = new Crypt_Blowfish("wibble");

$EncryptedTest = $BlowfishTest->encrypt("4900");

echo $BlowfishTest->decrypt($EncryptedTest);

Expected result:
----------------
4900

Actual result:
--------------
Notice: Undefined offset: 0 in Crypt_Blowfish.php on line ***

-------------------------------------------->

private function _encipher(&$Xl, &$Xr)
{
for ($i = 0; $i < 16; $i++) {
$temp = $Xl ^ $this->_P[$i]; ***

[2005-04-20 02:45 UTC] mike at cocoweb dot co dot uk

My fault.