ID:               37595
 Updated by:       [EMAIL PROTECTED]
 Reported By:      coditza at cluj dot astral dot ro
-Status:           Open
+Status:           Bogus
 Bug Type:         mcrypt related
 Operating System: windows
 PHP Version:      4.4.2
 New Comment:

Change
for($i=0;$i<$max;$i++) {
to
for($i=0;$i<=$max;$i++) {

Not PHP problem, just a user error.



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

[2006-05-29 13:07:08] coditza at cluj dot astral dot ro

The example is for freebsd 6.0 actually, but the beavior is the same
both on windows (with php4) and on freebsd (with php5)

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

[2006-05-25 23:49:00] coditza at cluj dot astral dot ro

Description:
------------
If the lenght of the encoded string is a multiple of chipher block
size, the last blocksize part of the chipher is lost at decoding.

Reproduce code:
---------------
Use the script at: http://www.coada.net/develop/crypt.phps to produce
an encoded file, then, from shell:

openssl bf-cbc -in out.dat -out out.dec -K
000102030405060708090a0b0c0d0e0f -iv 0102030405060708 -d

and

cat out.dec

Expected result:
----------------
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Actual result:
--------------
bad decrypt
31976:error:06065064:digital envelope routines:EVP_DecryptFinal:bad
decrypt:/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/evp/evp_enc.c:450:
[EMAIL PROTECTED] cat out.dec
[EMAIL PROTECTED]



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


-- 
Edit this bug report at http://bugs.php.net/?id=37595&edit=1

Reply via email to