Doc #68501 [ReO->Csd]: [FR] mcrypt_decrypt need key with specific length
| From: | jeanseb@php.net | Date: | Sun, 28 Dec 2014 17:47:27 +0000 |
| Subject: | Doc #68501 [ReO->Csd]: [FR] mcrypt_decrypt need key with specific length | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-11780@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68501&edit=1
ID: 68501
Updated by: jeanseb@php.net
Reported by: ogarbe at voyageprive dot com
Summary: [FR] mcrypt_decrypt need key with specific length
-Status: Re-Opened
+Status: Closed
Type: Documentation Problem
Package: Translation problem
Operating System: Debian
PHP Version: 5.6.3
-Assigned To:
+Assigned To: jeanseb
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2014-12-28 17:46:27] jeanseb@php.net
Automatic comment from SVN on behalf of jeanseb
Revision: http://svn.php.net/viewvc/?view=revision&revision=335430
Log: Sync with EN (Closing #68501)
------------------------------------------------------------------------
[2014-11-25 22:09:08] aharvey@php.net
Fair enough; reopening as a translation problem.
------------------------------------------------------------------------
[2014-11-25 22:05:21] ogarbe at voyageprive dot com
Thanks for this quick answer and sorry for this.
In fact the French documentation is outdated and doesn't include this change.
http://php.net/manual/fr/function.mcrypt-decrypt.php
------------------------------------------------------------------------
[2014-11-25 21:58:54] aharvey@php.net
http://php.net/mcrypt_decrypt already notes that
requirement both in the parameter documentation and changelog, and the 5.6 migration guide also
includes this.
------------------------------------------------------------------------
[2014-11-25 21:40:46] ogarbe at voyageprive dot com
Description:
------------
mcrypt_decrypt / encrypt changed between 5.4 and 5.6
in 5.6, and contrary to the doc, the second parameter $key needs to be of sizes 16, 24 or 32
supported, the key should be padded with "\0" to match correct sizes.
Test script:
---------------
$decryptText = mcrypt_decrypt(
MCRYPT_RIJNDAEL_256,
'1234567890ABCDEFGHIJKLM',
$cryptText,
MCRYPT_MODE_CBC,
'aworkingvector'
);
Expected result:
----------------
Dont throw this error
mcrypt_encrypt(): Key of size 22 not supported by this algorithm. Only keys of sizes 16, 24 or 32
supported
Or fix the documentation
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68501&edit=1