Provide expected IV length in IV error messages

This commit is contained in:
Nikita Popov 2014-03-05 12:42:01 +01:00
parent b9737aa08e
commit e5738d3bc9
12 changed files with 108 additions and 94 deletions

View 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,27 +1291,16 @@ 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");
if (php_mcrypt_ensure_valid_iv(td, iv, iv_len TSRMLS_CC) == FAILURE) {
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;
}
}
/* Check blocksize */
if (mcrypt_enc_is_block_mode(td) == 1) { /* It's a block algorithm */
int block_size = mcrypt_enc_get_block_size(td);

View 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)

View 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===

View 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===

View 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--

View 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)

View 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)

View 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===

View 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--

View 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===

View 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--

View 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===