]> granicus.if.org Git - php/commitdiff
Fixed Mcrypt deprecated functions and related tests
authorSherif Ramadan <googleguy@php.net>
Thu, 16 Aug 2012 14:21:22 +0000 (10:21 -0400)
committerSherif Ramadan <googleguy@php.net>
Thu, 16 Aug 2012 14:21:22 +0000 (10:21 -0400)
13 files changed:
ext/mcrypt/mcrypt.c
ext/mcrypt/tests/mcrypt_cbc.phpt
ext/mcrypt/tests/mcrypt_cbc_3des_decrypt.phpt
ext/mcrypt/tests/mcrypt_cbc_3des_encrypt.phpt
ext/mcrypt/tests/mcrypt_cbc_error.phpt
ext/mcrypt/tests/mcrypt_cbc_variation1.phpt
ext/mcrypt/tests/mcrypt_cbc_variation2.phpt
ext/mcrypt/tests/mcrypt_cbc_variation3.phpt
ext/mcrypt/tests/mcrypt_cbc_variation4.phpt
ext/mcrypt/tests/mcrypt_cbc_variation5.phpt
ext/mcrypt/tests/mcrypt_cfb.phpt
ext/mcrypt/tests/mcrypt_ofb.phpt
ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt

index 20a0f73b187d6f75cb4e0e0689db57540faa9bc6..dcac776d024c146cd9205309494939e30101e65c 100644 (file)
@@ -239,9 +239,9 @@ ZEND_END_ARG_INFO()
 
 const zend_function_entry mcrypt_functions[] = { /* {{{ */
        PHP_DEP_FE(mcrypt_ecb,                          arginfo_mcrypt_ecb)
-       PHP_FE(mcrypt_cbc,                              arginfo_mcrypt_cbc)
-       PHP_FE(mcrypt_cfb,                              arginfo_mcrypt_cfb)
-       PHP_FE(mcrypt_ofb,                              arginfo_mcrypt_ofb)
+       PHP_DEP_FE(mcrypt_cbc,                          arginfo_mcrypt_cbc)
+       PHP_DEP_FE(mcrypt_cfb,                          arginfo_mcrypt_cfb)
+       PHP_DEP_FE(mcrypt_ofb,                          arginfo_mcrypt_ofb)
        PHP_FE(mcrypt_get_key_size,     arginfo_mcrypt_get_key_size)
        PHP_FE(mcrypt_get_block_size,   arginfo_mcrypt_get_block_size)
        PHP_FE(mcrypt_get_cipher_name,  arginfo_mcrypt_get_cipher_name)
index f9160db011b7baff1d2aa49454150cbee9ebcc54..27cc5b222440433c024dd672f46affc826cea8c0 100644 (file)
@@ -18,6 +18,12 @@ echo trim(mcrypt_cbc($cipher, $key, $enc_data, MCRYPT_DECRYPT, $iv)) . "\n";
 mcrypt_cbc($cipher, $key, $enc_data, MCRYPT_DECRYPT);
 
 --EXPECTF--
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 PHP Testfest 2008
 
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
 Warning: mcrypt_cbc(): Attempt to use an empty IV, which is NOT recommend in %s on line %d
index 6df3079935306bd0de152215c70a887b60ebc101..67799a3fdd976eb745a548f8aa574e9275a264cf 100644 (file)
@@ -72,16 +72,24 @@ function special_var_dump($str) {
 --- testing different key lengths
 
 key length=8
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 string(32) "736563726574206d6573736167650000"
 
 key length=20
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 string(32) "736563726574206d6573736167650000"
 
 key length=24
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 string(32) "736563726574206d6573736167650000"
 
 key length=26
 
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
 Warning: mcrypt_cbc(): Size of key is too large for this algorithm in %s on line %d
 string(32) "736563726574206d6573736167650000"
 
@@ -89,14 +97,20 @@ string(32) "736563726574206d6573736167650000"
 
 iv length=4
 
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
 Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
 string(32) "736563726574206d6573736167650000"
 
 iv length=8
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 string(32) "736563726574206d6573736167650000"
 
 iv length=9
 
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
 Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
 string(32) "736563726574206d6573736167650000"
 ===DONE===
index 35fabd9aca7700bd74bff42a5114e595ceb0198e..1af094c27b04c6dd4fd3c15dbcf358aa02dc6e7c 100644 (file)
@@ -55,16 +55,24 @@ foreach ($ivs as $iv) {
 --- testing different key lengths
 
 key length=8
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 string(112) "082b437d039d09418e20dc9de1dafa7ed6da5c6335b78950968441da1faf40c1f886e04da8ca177b80b376811e138c1bf51cb48dae2e7939"
 
 key length=20
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 string(112) "0627351e0f8a082bf7981ae2c700a43fd3d44b270ac67b00fded1c5796eea935be0fef2a23da0b3f5e243929e62ac957bf0bf463aa90fc4f"
 
 key length=24
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 string(112) "b85e21072239d60c63a80e7c9ae493cb741a1cd407e52f451c5f43a0d103f55a7b62617eb2e44213c2d44462d388bc0b8f119384b12c84ac"
 
 key length=26
 
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
 Warning: mcrypt_cbc(): Size of key is too large for this algorithm in %s on line %d
 string(112) "b85e21072239d60c63a80e7c9ae493cb741a1cd407e52f451c5f43a0d103f55a7b62617eb2e44213c2d44462d388bc0b8f119384b12c84ac"
 
@@ -72,14 +80,20 @@ string(112) "b85e21072239d60c63a80e7c9ae493cb741a1cd407e52f451c5f43a0d103f55a7b6
 
 iv length=4
 
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
 Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
 string(112) "440a6f54601969b127aad3c217ce7583c7f7b29989693130645569301db0020b29a34a3dcd104b2d0e3ba19d6cbd8a33d352b9c27cc34ef1"
 
 iv length=8
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 string(112) "bac347506bf092c5557c4363c301745d78f047028e2953e84fd66b30aeb6005812dadbe8baa871b83278341599b0c448ddaaa52b5a378ce5"
 
 iv length=9
 
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
 Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
 string(112) "440a6f54601969b127aad3c217ce7583c7f7b29989693130645569301db0020b29a34a3dcd104b2d0e3ba19d6cbd8a33d352b9c27cc34ef1"
 ===DONE===
index ec3912b03fc393fa510bdf3dc8d7f89256d7be52..3c221802147e447eabbf2e89cf54bb03fd488ead 100644 (file)
@@ -41,11 +41,15 @@ var_dump( mcrypt_cbc($cipher, $key, $data) );
 
 -- Testing mcrypt_cbc() function with more than expected no. of arguments --
 
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
 Warning: mcrypt_cbc() expects at most 5 parameters, 6 given in %s on line %d
 NULL
 
 -- Testing mcrypt_cbc() function with less than expected no. of arguments --
 
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
 Warning: mcrypt_cbc() expects at least 4 parameters, 3 given in %s on line %d
 NULL
 ===DONE===
index 5482de3e20ace7b91d7422718020ae8e02e49064..eb233e3f92e901c9fed4ba12634a47b5c6bdb64e 100644 (file)
@@ -124,106 +124,132 @@ fclose($fp);
 *** Testing mcrypt_cbc() : usage variation ***
 
 --int 0--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --int 1--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --int 12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --int -12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --float 10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --float -10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --float 12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --float -12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --float .5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --empty array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 1 to be string, array given, %s(%d)
 NULL
 
 --int indexed array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 1 to be string, array given, %s(%d)
 NULL
 
 --associative array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 1 to be string, array given, %s(%d)
 NULL
 
 --nested arrays--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 1 to be string, array given, %s(%d)
 NULL
 
 --uppercase NULL--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --lowercase null--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --lowercase true--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --lowercase false--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --uppercase TRUE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --uppercase FALSE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --empty string DQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --empty string SQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --instance of classWithToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --instance of classWithoutToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 1 to be string, object given, %s(%d)
 NULL
 
 --undefined var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --unset var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): Module initialization failed, %s(%d)
 bool(false)
 
 --resource--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 1 to be string, resource given, %s(%d)
 NULL
 ===DONE===
index f49e80ee9379c7f35678dab019f96ef5eb718383..3d2a0614722d4f7862854391648b966c481f4372 100644 (file)
@@ -124,87 +124,112 @@ fclose($fp);
 *** Testing mcrypt_cbc() : usage variation ***
 
 --int 0--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "bc27b3a4e33b531d5983fc7df693cd09"
 
 --int 1--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "bc27b3a4e33b531d5983fc7df693cd09"
 
 --int 12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "d109b7973383127002474ae731c4b3a8"
 
 --int -12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "3e82a931cedb03a38b91a637ff8c9f9e"
 
 --float 10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "de71833586c1d7132a289960ebeeca7a"
 
 --float -10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "7d0489dd2e99ae910ecc015573f3dd16"
 
 --float 12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "978055b42c0506a8947e3c3c8d994baf"
 
 --float -12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "4aa84ba400c2b8ef467d4d98372b4f4e"
 
 --float .5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "e731dc5059b84e0c8774ac490f77d6e6"
 
 --empty array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 2 to be string, array given, %s(%d)
 string(0) ""
 
 --int indexed array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 2 to be string, array given, %s(%d)
 string(0) ""
 
 --associative array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 2 to be string, array given, %s(%d)
 string(0) ""
 
 --nested arrays--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 2 to be string, array given, %s(%d)
 string(0) ""
 
 --uppercase NULL--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "be722a5ffc361d721fbcab1eacc6acf5"
 
 --lowercase null--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "be722a5ffc361d721fbcab1eacc6acf5"
 
 --lowercase true--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "bc27b3a4e33b531d5983fc7df693cd09"
 
 --lowercase false--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "be722a5ffc361d721fbcab1eacc6acf5"
 
 --uppercase TRUE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "bc27b3a4e33b531d5983fc7df693cd09"
 
 --uppercase FALSE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "be722a5ffc361d721fbcab1eacc6acf5"
 
 --empty string DQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "be722a5ffc361d721fbcab1eacc6acf5"
 
 --empty string SQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "be722a5ffc361d721fbcab1eacc6acf5"
 
 --instance of classWithToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "19420fa26f561ee82ed84abbcd2d284b"
 
 --instance of classWithoutToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 2 to be string, object given, %s(%d)
 string(0) ""
 
 --undefined var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "be722a5ffc361d721fbcab1eacc6acf5"
 
 --unset var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "be722a5ffc361d721fbcab1eacc6acf5"
 
 --resource--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 2 to be string, resource given, %s(%d)
 string(0) ""
 ===DONE===
-
index 5b2398ddbda2f2cfd13005ab8736fd41c2ccf90c..9a1464b1122cc68ed5c0f291017bb4eec8861164 100644 (file)
@@ -124,87 +124,112 @@ fclose($fp);
 *** Testing mcrypt_cbc() : usage variation ***
 
 --int 0--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "ce5fcfe737859795"
 
 --int 1--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "84df495f6cd82dd9"
 
 --int 12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "905ab1ae27ee9991"
 
 --int -12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "5835174e9c67c3e7"
 
 --float 10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "28ff0601ad9e47fa"
 
 --float -10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "ce9f2b6e2fc3d9f7"
 
 --float 12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "24eb882ce9763e4018fba9b7f01b0c3e"
 
 --float -12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5eed30e428f32de1d7a7064d0ed4d3eb"
 
 --float .5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "bebf2a13676e1e30"
 
 --empty array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 3 to be string, array given, %s(%d)
 string(0) ""
 
 --int indexed array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 3 to be string, array given, %s(%d)
 string(0) ""
 
 --associative array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 3 to be string, array given, %s(%d)
 string(0) ""
 
 --nested arrays--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 3 to be string, array given, %s(%d)
 string(0) ""
 
 --uppercase NULL--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "206f6d3617a5ab32"
 
 --lowercase null--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "206f6d3617a5ab32"
 
 --lowercase true--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "84df495f6cd82dd9"
 
 --lowercase false--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "206f6d3617a5ab32"
 
 --uppercase TRUE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "84df495f6cd82dd9"
 
 --uppercase FALSE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "206f6d3617a5ab32"
 
 --empty string DQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "206f6d3617a5ab32"
 
 --empty string SQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "206f6d3617a5ab32"
 
 --instance of classWithToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "7c91cdf8f8c51485034a9ee528eb016b"
 
 --instance of classWithoutToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 3 to be string, object given, %s(%d)
 string(0) ""
 
 --undefined var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "206f6d3617a5ab32"
 
 --unset var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(16) "206f6d3617a5ab32"
 
 --resource--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 3 to be string, resource given, %s(%d)
 string(0) ""
 ===DONE===
-
index f9a511f3900834e1008efd2093d4685df56593a9..a3dd29ba41b052a154ab7e6790026b2fa49d7930 100644 (file)
@@ -124,82 +124,108 @@ fclose($fp);
 *** Testing mcrypt_cbc() : usage variation ***
 
 --float 10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "983d5edc5f77fe42e2372a0339dc22b0"
 
 --float -10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "983d5edc5f77fe42e2372a0339dc22b0"
 
 --float 12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "983d5edc5f77fe42e2372a0339dc22b0"
 
 --float -12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "983d5edc5f77fe42e2372a0339dc22b0"
 
 --float .5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5f781523f696d596e4b809d72197a0cc"
 
 --empty array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5f781523f696d596e4b809d72197a0cc"
 
 --int indexed array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "983d5edc5f77fe42e2372a0339dc22b0"
 
 --associative array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "983d5edc5f77fe42e2372a0339dc22b0"
 
 --nested arrays--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "983d5edc5f77fe42e2372a0339dc22b0"
 
 --uppercase NULL--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5f781523f696d596e4b809d72197a0cc"
 
 --lowercase null--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5f781523f696d596e4b809d72197a0cc"
 
 --lowercase true--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "983d5edc5f77fe42e2372a0339dc22b0"
 
 --lowercase false--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5f781523f696d596e4b809d72197a0cc"
 
 --uppercase TRUE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "983d5edc5f77fe42e2372a0339dc22b0"
 
 --uppercase FALSE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5f781523f696d596e4b809d72197a0cc"
 
 --empty string DQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5f781523f696d596e4b809d72197a0cc"
 
 --empty string SQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5f781523f696d596e4b809d72197a0cc"
 
 --string DQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5f781523f696d596e4b809d72197a0cc"
 
 --string SQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5f781523f696d596e4b809d72197a0cc"
 
 --mixed case string--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5f781523f696d596e4b809d72197a0cc"
 
 --heredoc--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5f781523f696d596e4b809d72197a0cc"
 
 --instance of classWithToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 8 - Object of class classWithToString could not be converted to int, %s(%d)
 string(32) "983d5edc5f77fe42e2372a0339dc22b0"
 
 --instance of classWithoutToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 8 - Object of class classWithoutToString could not be converted to int, %s(%d)
 string(32) "983d5edc5f77fe42e2372a0339dc22b0"
 
 --undefined var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5f781523f696d596e4b809d72197a0cc"
 
 --unset var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 string(32) "5f781523f696d596e4b809d72197a0cc"
 
 --resource--
-string(%d) %s
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
+string(32) "983d5edc5f77fe42e2372a0339dc22b0"
 ===DONE===
index 7d49db853d36f4d50504f60c5c90ad511399baae..0c75c97934104b5837d9a38ddd68e2a833f4d069 100644 (file)
@@ -124,106 +124,132 @@ fclose($fp);
 *** Testing mcrypt_cbc() : usage variation ***
 
 --int 0--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --int 1--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --int 12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --int -12345--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --float 10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --float -10.5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --float 12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --float -12.3456789000e10--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --float .5--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --empty array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 5 to be string, array given, %s(%d)
 string(0) ""
 
 --int indexed array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 5 to be string, array given, %s(%d)
 string(0) ""
 
 --associative array--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 5 to be string, array given, %s(%d)
 string(0) ""
 
 --nested arrays--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 5 to be string, array given, %s(%d)
 string(0) ""
 
 --uppercase NULL--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --lowercase null--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --lowercase true--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --lowercase false--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --uppercase TRUE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --uppercase FALSE--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --empty string DQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --empty string SQ--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --instance of classWithToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --instance of classWithoutToString--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 5 to be string, object given, %s(%d)
 string(0) ""
 
 --undefined var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --unset var--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc(): The IV parameter must be as long as the blocksize, %s(%d)
 string(32) "6438db90653c4d3080c3ceab43618c05"
 
 --resource--
+Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
 Error: 2 - mcrypt_cbc() expects parameter 5 to be string, resource given, %s(%d)
 string(0) ""
 ===DONE===
index 54919c858971c6cbaec0dd8b6dd2dde27452f9e6..11120633a5e82ed5ec0398cae16f31e0aaa029b0 100644 (file)
@@ -18,6 +18,12 @@ echo trim(mcrypt_cfb($cipher, $key, $enc_data, MCRYPT_DECRYPT, $iv)) . "\n";
 mcrypt_cfb($cipher, $key, $enc_data, MCRYPT_DECRYPT);
 
 --EXPECTF--
+
+Deprecated: Function mcrypt_cfb() is deprecated in %s on line %d
+
+Deprecated: Function mcrypt_cfb() is deprecated in %s on line %d
 PHP Testfest 2008
 
+Deprecated: Function mcrypt_cfb() is deprecated in %s on line %d
+
 Warning: mcrypt_cfb(): Attempt to use an empty IV, which is NOT recommend in %s on line %d
index 1532c4cf29f82b91a14ba31cb072db039fa3bc92..942035306035a6a06bef49cff5dfbdb44735a43d 100644 (file)
@@ -17,5 +17,11 @@ echo trim(mcrypt_ofb($cipher, $key, $enc_data, MCRYPT_DECRYPT, $iv)) . "\n";
 // a warning must be issued if we don't use a IV on a AES cipher, that usually requires an IV
 mcrypt_ofb($cipher, $key, $enc_data, MCRYPT_DECRYPT, $iv);
 
---EXPECT--
-PHP Testfest 2008
\ No newline at end of file
+--EXPECTF--
+
+Deprecated: Function mcrypt_ofb() is deprecated in %s on line %d
+
+Deprecated: Function mcrypt_ofb() is deprecated in %s on line %d
+PHP Testfest 2008
+
+Deprecated: Function mcrypt_ofb() is deprecated in %s on line %d
index 100352a1c7e3442c0692253cc0758c3dcad0138e..e450a69047e1d14b1257af53ce18304ccf75da10 100644 (file)
@@ -76,24 +76,34 @@ foreach ($ivs as $iv) {
 
 key length=0
 string(128) "4fbf24aaa789f5194260ade1acd9499402c1845cc517e8fe43cfb5b90a0df294db33ecd1a836c47d6bf6d8600512ba415e17008a1e1991f81056258d82099397"
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 string(128) "546869732069732074686520736563726574206d657373616765207768696368206d75737420626520656e637279707465640000000000000000000000000000"
 
 key length=0
 string(128) "4fbf24aaa789f5194260ade1acd9499402c1845cc517e8fe43cfb5b90a0df294db33ecd1a836c47d6bf6d8600512ba415e17008a1e1991f81056258d82099397"
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 string(128) "546869732069732074686520736563726574206d657373616765207768696368206d75737420626520656e637279707465640000000000000000000000000000"
 
 key length=8
 string(128) "d6a3042b278fa5816dc6f46152acbe5fd7d1813c3808c27cd969d8e10a64d0238724edfda0322f4512308f22d142df0e92bed861c2b732f7650e234df59183dc"
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 string(128) "546869732069732074686520736563726574206d657373616765207768696368206d75737420626520656e637279707465640000000000000000000000000000"
 
 key length=16
 string(128) "dc8f957ec530acf10cd95ba7da7b6405380fe19a2941e9a8de54680512f18491bc374e5464885ae6c2ae2aa7a6cdd2fbe12a06bbc4bd59dbbfaa15f09044f101"
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 string(128) "546869732069732074686520736563726574206d657373616765207768696368206d75737420626520656e637279707465640000000000000000000000000000"
 
 --- testing different iv lengths
 
 iv length=0
 
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
 Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
 string(128) "c082b3fabaae4c8c410eb8dba64bae10e48d79b5241fb8f24462cad43bd0b35ad2746b00817e9dcbc636b44df0ec60b46a57e7a310a308a0947724e3817a13b4"
 
@@ -102,6 +112,8 @@ string(128) "546869732069732074686520736563726574206d657373616765207768696368206
 
 iv length=0
 
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
 Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
 string(128) "c082b3fabaae4c8c410eb8dba64bae10e48d79b5241fb8f24462cad43bd0b35ad2746b00817e9dcbc636b44df0ec60b46a57e7a310a308a0947724e3817a13b4"
 
@@ -110,6 +122,8 @@ string(128) "546869732069732074686520736563726574206d657373616765207768696368206
 
 iv length=8
 
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
 Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
 string(128) "c082b3fabaae4c8c410eb8dba64bae10e48d79b5241fb8f24462cad43bd0b35ad2746b00817e9dcbc636b44df0ec60b46a57e7a310a308a0947724e3817a13b4"
 
@@ -117,14 +131,18 @@ Warning: mcrypt_decrypt(): The IV parameter must be as long as the blocksize in
 string(128) "546869732069732074686520736563726574206d657373616765207768696368206d75737420626520656e637279707465640000000000000000000000000000"
 
 iv length=16
+
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 string(128) "dc8f957ec530acf10cd95ba7da7b6405380fe19a2941e9a8de54680512f18491bc374e5464885ae6c2ae2aa7a6cdd2fbe12a06bbc4bd59dbbfaa15f09044f101"
 string(128) "546869732069732074686520736563726574206d657373616765207768696368206d75737420626520656e637279707465640000000000000000000000000000"
 
 iv length=17
 
+Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
+
 Warning: mcrypt_cbc(): The IV parameter must be as long as the blocksize in %s on line %d
 string(128) "c082b3fabaae4c8c410eb8dba64bae10e48d79b5241fb8f24462cad43bd0b35ad2746b00817e9dcbc636b44df0ec60b46a57e7a310a308a0947724e3817a13b4"
 
 Warning: mcrypt_decrypt(): The IV parameter must be as long as the blocksize in %s on line %d
 string(128) "546869732069732074686520736563726574206d657373616765207768696368206d75737420626520656e637279707465640000000000000000000000000000"
-===DONE===
\ No newline at end of file
+===DONE===