ID:               27118
 User updated by:  php-bug at ulterium dot com
 Reported By:      php-bug at ulterium dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         mcrypt related
 Operating System: Win2000 OR Win2003
 PHP Version:      4.3.4
 New Comment:

It works perfectly with build (php4-win32-STABLE-200402020930\sapi).

Is this safe to use in production environment?


Thank you,

Richard


Previous Comments:
------------------------------------------------------------------------

[2004-02-02 03:21:52] [EMAIL PROTECTED]

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



------------------------------------------------------------------------

[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

Reply via email to