]> granicus.if.org Git - php/commitdiff
Provide expected IV length in IV error messages
authorNikita Popov <nikic@php.net>
Wed, 5 Mar 2014 11:42:01 +0000 (12:42 +0100)
committerNikita Popov <nikic@php.net>
Wed, 5 Mar 2014 14:32:32 +0000 (15:32 +0100)
12 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_variation5.phpt
ext/mcrypt/tests/mcrypt_cfb.phpt
ext/mcrypt/tests/mcrypt_decrypt.phpt
ext/mcrypt/tests/mcrypt_decrypt_3des_cbc.phpt
ext/mcrypt/tests/mcrypt_decrypt_variation5.phpt
ext/mcrypt/tests/mcrypt_encrypt_3des_cbc.phpt
ext/mcrypt/tests/mcrypt_encrypt_variation5.phpt
ext/mcrypt/tests/mcrypt_rijndael128_128BitKey.phpt

index a8dbc4203ab4d4775eca17ced9d5818e808f9eab..91be96ece96c18da1dddbb10cad28fbac2b1b852 100644 (file)
@@ -1250,6 +1250,31 @@ static int php_mcrypt_ensure_valid_key_size(MCRYPT td, int key_size TSRMLS_DC) /
 }
 /* }}} */
 
+static int php_mcrypt_ensure_valid_iv(MCRYPT td, const char *iv, int iv_size TSRMLS_DC) /* {{{ */
+{
+       if (mcrypt_enc_mode_has_iv(td) == 1) {
+               int expected_iv_size = mcrypt_enc_get_iv_size(td);
+
+               if (!iv) {
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING,
+                               "Encryption mode requires an initialization vector of size %d", expected_iv_size
+                       );
+                       return FAILURE;
+               }
+
+               if (iv_size != expected_iv_size) {
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING,
+                               "Received initialization vector of size %d, but size %d is required "
+                               "for this encryption mode", iv_size, expected_iv_size
+                       );
+                       return FAILURE;
+               }
+       }
+
+       return SUCCESS;
+}
+/* }}} */
+
 static void php_mcrypt_do_crypt(char* cipher, const char *key, int key_len, const char *data, int data_len, char *mode, const char *iv, int iv_len, int dencrypt, zval* return_value TSRMLS_DC) /* {{{ */
 {
        char *cipher_dir_string;
@@ -1266,25 +1291,14 @@ static void php_mcrypt_do_crypt(char* cipher, const char *key, int key_len, cons
                RETURN_FALSE;
        }
 
-       /* Checking for key-length */
        if (php_mcrypt_ensure_valid_key_size(td, key_len TSRMLS_CC) == FAILURE) {
                mcrypt_module_close(td);
                RETURN_FALSE;
        }
-       
-       /* IV is required */
-       if (mcrypt_enc_mode_has_iv(td) == 1) {
-               if (!iv) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Encryption mode requires an initialization vector");
-                       mcrypt_module_close(td);
-                       RETURN_FALSE;
-               }
 
-               if (iv_len != mcrypt_enc_get_iv_size(td)) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, MCRYPT_IV_WRONG_SIZE);
-                       mcrypt_module_close(td);
-                       RETURN_FALSE;
-               }
+       if (php_mcrypt_ensure_valid_iv(td, iv, iv_len TSRMLS_CC) == FAILURE) {
+               mcrypt_module_close(td);
+               RETURN_FALSE;
        }
 
        /* Check blocksize */
index cf723e3803258cd5f56c37a961662a69ca46e72f..c2e879370d8ab9f28c328a367744df2e338c4839 100644 (file)
@@ -27,5 +27,5 @@ PHP Testfest 2008
 
 Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
 
-Warning: mcrypt_cbc(): Encryption mode requires an initialization vector in %s on line %d
+Warning: mcrypt_cbc(): Encryption mode requires an initialization vector of size 16 in %s on line %d
 bool(false)
index c3559231be4742946534adefec5a1d3edb6a65bc..e610f7cfa0cf331a034c97008ebe3370c675ef95 100644 (file)
@@ -103,7 +103,7 @@ 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
+Warning: mcrypt_cbc(): Received initialization vector of size 4, but size 8 is required for this encryption mode in %s on line %d
 string(0) ""
 
 iv length=8
@@ -115,6 +115,6 @@ 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
+Warning: mcrypt_cbc(): Received initialization vector of size 9, but size 8 is required for this encryption mode in %s on line %d
 string(0) ""
 ===DONE===
index 978e263588b6b2f068109611d838bedca90a215f..c5606e71a028bad0f184f12fed7c0450d3708738 100644 (file)
@@ -86,7 +86,7 @@ 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
+Warning: mcrypt_cbc(): Received initialization vector of size 4, but size 8 is required for this encryption mode in %s on line %d
 string(0) ""
 
 iv length=8
@@ -98,6 +98,6 @@ 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
+Warning: mcrypt_cbc(): Received initialization vector of size 9, but size 8 is required for this encryption mode in %s on line %d
 string(0) ""
 ===DONE===
index 24d518d096e482e374b980173212c9045d68b1ef..884d90963eced5154609c0799b80167a69ec4027 100644 (file)
@@ -125,47 +125,47 @@ fclose($fp);
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --empty array--
@@ -190,47 +190,47 @@ 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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --instance of classWithoutToString--
@@ -240,12 +240,12 @@ 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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --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)
+Error: 2 - mcrypt_cbc(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --resource--
index a82ea46d115f4d345bfb973c62e7ad98e6c96942..5b6842310bbb564926b6144dcec59bece960e890 100644 (file)
@@ -26,5 +26,5 @@ PHP Testfest 2008
 
 Deprecated: Function mcrypt_cfb() is deprecated in %s on line %d
 
-Warning: mcrypt_cfb(): Encryption mode requires an initialization vector in %s on line %d
+Warning: mcrypt_cfb(): Encryption mode requires an initialization vector of size 16 in %s on line %d
 bool(false)
index f615889f9ae0ae5a00f7618ad4426ef69a69de86..f10757c45d589ec4b31ee5afb5865010f5b4855e 100644 (file)
@@ -22,8 +22,8 @@ var_dump(mcrypt_decrypt(MCRYPT_BLOWFISH, "FooBar", $enc_data, MCRYPT_MODE_CBC, $
 --EXPECTF--
 PHP Testfest 2008
 
-Warning: mcrypt_decrypt(): Encryption mode requires an initialization vector in %s on line %d
+Warning: mcrypt_decrypt(): Encryption mode requires an initialization vector of size 16 in %s on line %d
 bool(false)
 
-Warning: mcrypt_decrypt(): The IV parameter must be as long as the blocksize in %s on line %d
+Warning: mcrypt_decrypt(): Received initialization vector of size 16, but size 8 is required for this encryption mode in %s on line %d
 bool(false)
index f0449080344566020433ba47861572397c2df056..60af213911b424f25278d9a2f24441d850377045 100644 (file)
@@ -92,7 +92,7 @@ string(0) ""
 
 iv length=4
 
-Warning: mcrypt_decrypt(): The IV parameter must be as long as the blocksize in %s on line %d
+Warning: mcrypt_decrypt(): Received initialization vector of size 4, but size 8 is required for this encryption mode in %s on line %d
 string(0) ""
 
 iv length=8
@@ -100,6 +100,6 @@ string(32) "659ec947f4dc3a3b9c50de744598d3c8"
 
 iv length=9
 
-Warning: mcrypt_decrypt(): The IV parameter must be as long as the blocksize in %s on line %d
+Warning: mcrypt_decrypt(): Received initialization vector of size 9, but size 8 is required for this encryption mode in %s on line %d
 string(0) ""
 ===DONE===
index 60941fed3326c5713047b31985d4e2e5647281b2..0f5093ba886c62e0c350d879e88a56370101d3cf 100644 (file)
@@ -124,39 +124,39 @@ fclose($fp);
 *** Testing mcrypt_decrypt() : usage variation ***
 
 --int 0--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --int 1--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --int 12345--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --int -12345--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --float 10.5--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --float -10.5--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --float 12.3456789000e10--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --float -12.3456789000e10--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --float .5--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --empty array--
@@ -176,39 +176,39 @@ Error: 2 - mcrypt_decrypt() expects parameter 5 to be string, array given, %s(%d
 string(0) ""
 
 --uppercase NULL--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --lowercase null--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --lowercase true--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --lowercase false--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --uppercase TRUE--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --uppercase FALSE--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --empty string DQ--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --empty string SQ--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --instance of classWithToString--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --instance of classWithoutToString--
@@ -216,11 +216,11 @@ Error: 2 - mcrypt_decrypt() expects parameter 5 to be string, object given, %s(%
 string(0) ""
 
 --undefined var--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --unset var--
-Error: 2 - mcrypt_decrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_decrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --resource--
index 8f635a786915c586fcfb490ea6e3bc44d95c3fbe..51a64943b29ab32cf173087d15c9c16f027c82a3 100644 (file)
@@ -85,7 +85,7 @@ string(0) ""
 
 iv length=4
 
-Warning: mcrypt_encrypt(): The IV parameter must be as long as the blocksize in %s on line %d
+Warning: mcrypt_encrypt(): Received initialization vector of size 4, but size 8 is required for this encryption mode in %s on line %d
 string(0) ""
 
 iv length=8
@@ -93,6 +93,6 @@ string(112) "b85e21072239d60c63a80e7c9ae493cb741a1cd407e52f451c5f43a0d103f55a7b6
 
 iv length=9
 
-Warning: mcrypt_encrypt(): The IV parameter must be as long as the blocksize in %s on line %d
+Warning: mcrypt_encrypt(): Received initialization vector of size 9, but size 8 is required for this encryption mode in %s on line %d
 string(0) ""
 ===DONE===
index 07c5e158cbe18089b155acc6eb10648f57cc5e83..fdba526840c803f1b691dc3cff6213800993f914 100644 (file)
@@ -125,39 +125,39 @@ fclose($fp);
 *** Testing mcrypt_encrypt() : usage variation ***
 
 --int 0--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --int 1--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --int 12345--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --int -12345--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --float 10.5--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --float -10.5--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --float 12.3456789000e10--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --float -12.3456789000e10--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --float .5--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --empty array--
@@ -177,39 +177,39 @@ Error: 2 - mcrypt_encrypt() expects parameter 5 to be string, array given, %s(%d
 string(0) ""
 
 --uppercase NULL--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --lowercase null--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --lowercase true--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --lowercase false--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --uppercase TRUE--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --uppercase FALSE--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --empty string DQ--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --empty string SQ--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --instance of classWithToString--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --instance of classWithoutToString--
@@ -217,11 +217,11 @@ Error: 2 - mcrypt_encrypt() expects parameter 5 to be string, object given, %s(%
 string(0) ""
 
 --undefined var--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --unset var--
-Error: 2 - mcrypt_encrypt(): The IV parameter must be as long as the blocksize, %s(%d)
+Error: 2 - mcrypt_encrypt(): Received initialization vector of size %d, but size 8 is required for this encryption mode, %s(%d)
 string(0) ""
 
 --resource--
index decbff2e3a8223dbf0031147e13cff6cdbc8c2d5..621f7b1dbd4dbd9af7425e89c812a2da67a3c3b2 100644 (file)
@@ -116,30 +116,30 @@ 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
+Warning: mcrypt_cbc(): Received initialization vector of size 0, but size 16 is required for this encryption mode in %s on line %d
 string(0) ""
 
-Warning: mcrypt_decrypt(): The IV parameter must be as long as the blocksize in %s on line %d
+Warning: mcrypt_decrypt(): Received initialization vector of size 0, but size 16 is required for this encryption mode in %s on line %d
 string(0) ""
 
 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
+Warning: mcrypt_cbc(): Received initialization vector of size 0, but size 16 is required for this encryption mode in %s on line %d
 string(0) ""
 
-Warning: mcrypt_decrypt(): The IV parameter must be as long as the blocksize in %s on line %d
+Warning: mcrypt_decrypt(): Received initialization vector of size 0, but size 16 is required for this encryption mode in %s on line %d
 string(0) ""
 
 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
+Warning: mcrypt_cbc(): Received initialization vector of size 8, but size 16 is required for this encryption mode in %s on line %d
 string(0) ""
 
-Warning: mcrypt_decrypt(): The IV parameter must be as long as the blocksize in %s on line %d
+Warning: mcrypt_decrypt(): Received initialization vector of size 8, but size 16 is required for this encryption mode in %s on line %d
 string(0) ""
 
 iv length=16
@@ -152,9 +152,9 @@ 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
+Warning: mcrypt_cbc(): Received initialization vector of size 17, but size 16 is required for this encryption mode in %s on line %d
 string(0) ""
 
-Warning: mcrypt_decrypt(): The IV parameter must be as long as the blocksize in %s on line %d
+Warning: mcrypt_decrypt(): Received initialization vector of size 17, but size 16 is required for this encryption mode in %s on line %d
 string(0) ""
 ===DONE===