|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-11-08 16:05 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2020-11-08 16:05 UTC] nikic@php.net
[2020-11-08 16:13 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 19:00:01 2026 UTC |
Description: ------------ openssl cipher methods aes-128-ocb / aes-192-ocb / aes-256-ocb not working Test script: --------------- --TEST-- Test aes-128-ocb / aes-192-ocb / aes-256-ocb --FILE-- <?php function testDecrypt($method) { $str = 'foo'; $key = 'key'; $len = openssl_cipher_iv_length($method); $iv = openssl_random_pseudo_bytes($len); $encode = openssl_encrypt($str, $method, $key, 0, $iv); $decode = openssl_decrypt($encode, $method, $key, 0, $iv); var_dump($decode === $key); } testDecrypt('aes-128-ocb'); testDecrypt('aes-192-ocb'); testDecrypt('aes-256-ocb'); ?> --EXPECTF-- bool(true) bool(true) bool(true) Expected result: ---------------- bool(true) bool(true) bool(true) Actual result: -------------- bool(false) bool(false) bool(false)