|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-05-07 03:04 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 01:00:01 2025 UTC |
I noticed something quite strange when using the mcrypt library to encrypt data. say i would encrypt $data in mode ECB: $l = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $data, MCRYPT_MODE_ECB, $iv); then decrypt it: $l = mcrypt_decrypt(MCRYPT_BLOWFISH, $key, $data, MCRYPT_MODE_ECB, $iv); It seems like the padding prevents me from using the variable correctly in some conditions. As explained in the documentation, the padding is made of '\0' and in the following example: <? exec("echo.sh $l foobar", $value, $return); exec would actually stop at $l because of the '\0' and not pass the 'foobar' arg. I don't know if this is a known bug or a "supposed" behaviour, but it is surely annoying :)