#27118 [Opn->Fbk]: PHP 4.3.4 Crashes with mcrypt_decrypt but mcrypt_encrypt works perfectly.
| From: | sniper@php.net | Date: | Mon, 02 Feb 2004 08:21:53 +0000 |
| Subject: | #27118 [Opn->Fbk]: PHP 4.3.4 Crashes with mcrypt_decrypt but mcrypt_encrypt works perfectly. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-54280@lists.php.net to get a copy of this message | ||
ID: 27118
Updated by: sniper@php.net
Reported By: php-bug at ulterium dot com
-Status: Open
+Status: Feedback
Bug Type: mcrypt related
Operating System: Win2000 OR Win2003
PHP Version: 4.3.4
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2004-02-02 00:50:20] php-bug at ulterium dot com
Description:
------------
Note: Also seen on Apache from a user's report on another web page. No
solutions found from searching web.
Using latest libmcrypt.dll and all permissions set correctly.
If the mcrypt_decrypt line is // out then it will complete but only do
the encrypt.
Any ideas?
Reproduce code:
---------------
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256,
MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$key = "This is a key";
$text = "This is a test string.";
echo strlen($text) . "<br>";
echo $text."<br>";
$crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text,
MCRYPT_MODE_ECB, $iv);
echo strlen($crypttext) . "<br>";
echo $crypttext."<br>";
$decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $crypttext,
MCRYPT_MODE_ECB, $iv);
echo strlen($decrypttext) . "<br>";
echo $decrypttext."<br>";
Expected result:
----------------
Should DeCrypt String
Actual result:
--------------
PHP has encountered an Access Violation at 6C1994EB42
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27118&edit=1