Doc #68501 [Nab->ReO]: [FR] mcrypt_decrypt need key with specific length

From: Date: Tue, 25 Nov 2014 22:09:08 +0000
Subject: Doc #68501 [Nab->ReO]: [FR] mcrypt_decrypt need key with specific length
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11703@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: aharvey@php.net Reported by: ogarbe at voyageprive dot com -Summary: mcrypt_decrypt need key with specific length +Summary: [FR] mcrypt_decrypt need key with specific length -Status: Not a bug +Status: Re-Opened Type: Documentation Problem -Package: mcrypt related +Package: Translation problem Operating System: Debian PHP Version: 5.6.3 Block user comment: N Private report: N New Comment: Fair enough; reopening as a translation problem. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.doc.bugs (#11703) next »