Doc #76499 [NEW]: openssl_decrypt The cipher method list lack

From: Date: Tue, 19 Jun 2018 11:36:22 +0000
Subject: Doc #76499 [NEW]: openssl_decrypt The cipher method list lack
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15795@lists.php.net to get a copy of this message
From: song_121292057 at 126 dot com Operating system: Linux PHP version: 7.1.18 Package: Documentation problem Bug Type: Documentation Problem Bug description:openssl_decrypt The cipher method list lack Description: ------------ --- From manual page: http://www.php.net/function.openssl-decrypt --- null Test script: --------------- $str = 'AL1t8UIi4gt8eFZQu7R631eI40YK8CEgVHPWRekE4cG+rRbEAwbiFrZViHU9OMTJVcNO/dvMCwUbyOs6mQKQCw=='; $key = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQChFetx5+VKDoEXzZ+5Wozt3MfWMM/TiKMlWmAKXBViv8/e6j6SU/lSlWkMajd59aiWczs+qf9dMuRpe/l9Qke9DnVMn24JNLXjWD+y+w3yKRwd3CTtF7gx8/ToZl5XqFIT5YB1QfQCdAf8Z18IdQrJIijs8ssczY/RfqKZLo+KLQIDAQAB'; $md5key = strtoupper(md5($key)); $key = hex2bin($md5key); $decrypted= mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, base64_decode($str), MCRYPT_MODE_ECB); $decrypted_error= openssl_decrypt(base64_decode($str),'AES-128-CBC',$key,OPENSSL_RAW_DATA|OPENSSL_ZERO_PADDING); $decrypted_success= openssl_decrypt(base64_decode($str),'AES-128-ECB',$key,OPENSSL_RAW_DATA|OPENSSL_ZERO_PADDING); print_r($decrypted); echo "<br/>"; print_r($decrypted_error); echo "<br/>"; print_r($decrypted_success); exit(); Expected result: ---------------- {"resCode":"99024","resMessage":"UNKNOW_SERVICE_EXCEPTION"} {"resCode":"99024�A�0G�F %1��X�uݭ D�v6��G����U�SR�Y�w�p8=�� {"resCode":"99024","resMessage":"UNKNOW_SERVICE_EXCEPTION"} -- Edit bug report at https://bugs.php.net/bug.php?id=76499&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76499&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76499&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76499&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76499&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76499&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76499&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76499&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76499&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76499&r=support Expected behavior: https://bugs.php.net/fix.php?id=76499&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76499&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76499&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76499&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76499&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76499&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76499&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76499&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76499&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76499&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76499&r=mysqlcfg

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