#include "php_globals.h"
#include "ext/standard/info.h"
#include "ext/standard/php_rand.h"
+#include "ext/standard/php_smart_str.h"
#include "php_mcrypt_filter.h"
static int le_mcrypt;
}
/* }}} */
-static zend_bool php_mcrypt_is_valid_key_size(MCRYPT td, int key_len) /* {{{ */
+static char *php_mcrypt_get_key_size_str(
+ int max_key_size, const int *key_sizes, int key_size_count) /* {{{ */
{
- if (key_len <= 0) {
- return 0;
+ if (key_size_count == 0) {
+ char *str;
+ spprintf(&str, 0, "Only keys of size 1 to %d supported", max_key_size);
+ return str;
+ } else if (key_size_count == 1) {
+ char *str;
+ spprintf(&str, 0, "Only keys of size %d supported", key_sizes[0]);
+ return str;
+ } else {
+ int i;
+ smart_str str = {0};
+ smart_str_appends(&str, "Only keys of sizes ");
+
+ for (i = 0; i < key_size_count; ++i) {
+ if (i == key_size_count - 1) {
+ smart_str_appends(&str, " or ");
+ } else if (i != 0) {
+ smart_str_appends(&str, ", ");
+ }
+
+ smart_str_append_long(&str, key_sizes[i]);
+ }
+
+ smart_str_appends(&str, " supported");
+ smart_str_0(&str);
+ return str.c;
}
+}
+/* }}} */
- if (key_len > mcrypt_enc_get_key_size(td)) {
+static zend_bool php_mcrypt_is_valid_key_size(
+ int key_size, int max_key_size, int *key_sizes, int key_size_count) /* {{{ */
+{
+ int i;
+
+ if (key_size <= 0 || key_size > max_key_size) {
return 0;
}
- {
- int count, i;
- int *key_sizes = mcrypt_enc_get_supported_key_sizes(td, &count);
+ if (key_size_count == 0) {
+ /* All key sizes are valid */
+ return 1;
+ }
- if (!key_sizes) {
- /* All key sizes are valid */
+ for (i = 0; i < key_size_count; i++) {
+ if (key_sizes[i] == key_size) {
return 1;
}
+ }
- for (i = 0; i < count; i++) {
- if (key_sizes[i] == key_len) {
- mcrypt_free(key_sizes);
- return 1;
- }
- }
+ return 0;
+}
+/* }}} */
+
+static int php_mcrypt_ensure_valid_key_size(MCRYPT td, int key_size TSRMLS_DC) /* {{{ */
+{
+ int key_size_count;
+ int max_key_size = mcrypt_enc_get_key_size(td);
+ int *key_sizes = mcrypt_enc_get_supported_key_sizes(td, &key_size_count);
+
+ zend_bool is_valid_key_size = php_mcrypt_is_valid_key_size(
+ key_size, max_key_size, key_sizes, key_size_count
+ );
+ if (!is_valid_key_size) {
+ char *key_size_str = php_mcrypt_get_key_size_str(
+ max_key_size, key_sizes, key_size_count
+ );
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,
+ "Key of size %d not supported by this algorithm. %s", key_size, key_size_str
+ );
+ efree(key_size_str);
+ }
+ if (key_sizes) {
mcrypt_free(key_sizes);
- return 0;
}
+
+ return is_valid_key_size ? SUCCESS : FAILURE;
}
/* }}} */
}
/* Checking for key-length */
- if (!php_mcrypt_is_valid_key_size(td, key_len)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Key of length %d not supported by this algorithm", key_len);
+ if (php_mcrypt_ensure_valid_key_size(td, key_len TSRMLS_CC) == FAILURE) {
RETURN_FALSE;
}
Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
-Warning: mcrypt_cbc(): Key of length 8 not supported by this algorithm in %s on line %d
+Warning: mcrypt_cbc(): Key of size 8 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=20
Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
-Warning: mcrypt_cbc(): Key of length 20 not supported by this algorithm in %s on line %d
+Warning: mcrypt_cbc(): Key of size 20 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=24
Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
-Warning: mcrypt_cbc(): Key of length 26 not supported by this algorithm in %s on line %d
+Warning: mcrypt_cbc(): Key of size 26 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
--- testing different iv lengths
Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
-Warning: mcrypt_cbc(): Key of length 8 not supported by this algorithm in %s on line %d
+Warning: mcrypt_cbc(): Key of size 8 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=20
Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
-Warning: mcrypt_cbc(): Key of length 20 not supported by this algorithm in %s on line %d
+Warning: mcrypt_cbc(): Key of size 20 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=24
Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
-Warning: mcrypt_cbc(): Key of length 26 not supported by this algorithm in %s on line %d
+Warning: mcrypt_cbc(): Key of size 26 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
--- testing different iv lengths
--int 0--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--int 1--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--int 12345--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--int -12345--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float 10.5--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float -10.5--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float 12.3456789000e10--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float -12.3456789000e10--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float .5--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--empty array--
--uppercase NULL--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--lowercase null--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--lowercase true--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--lowercase false--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--uppercase TRUE--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--uppercase FALSE--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--empty string DQ--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--empty string SQ--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--instance of classWithToString--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--instance of classWithoutToString--
--undefined var--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--unset var--
Error: 8192 - Function mcrypt_cbc() is deprecated, %s(%d)
-Error: 2 - mcrypt_cbc(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_cbc(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--resource--
key length=8
-Warning: mcrypt_decrypt(): Key of length 8 not supported by this algorithm in %s on line %d
+Warning: mcrypt_decrypt(): Key of size 8 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=20
-Warning: mcrypt_decrypt(): Key of length 20 not supported by this algorithm in %s on line %d
+Warning: mcrypt_decrypt(): Key of size 20 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=24
key length=26
-Warning: mcrypt_decrypt(): Key of length 26 not supported by this algorithm in %s on line %d
+Warning: mcrypt_decrypt(): Key of size 26 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
--- testing different iv lengths
key length=8
-Warning: mcrypt_decrypt(): Key of length 8 not supported by this algorithm in %s on line %d
+Warning: mcrypt_decrypt(): Key of size 8 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=20
-Warning: mcrypt_decrypt(): Key of length 20 not supported by this algorithm in %s on line %d
+Warning: mcrypt_decrypt(): Key of size 20 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=24
key length=26
-Warning: mcrypt_decrypt(): Key of length 26 not supported by this algorithm in %s on line %d
+Warning: mcrypt_decrypt(): Key of size 26 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
--- testing different iv lengths
*** Testing mcrypt_decrypt() : usage variation ***
--int 0--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--int 1--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--int 12345--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--int -12345--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float 10.5--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float -10.5--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float 12.3456789000e10--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float -12.3456789000e10--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float .5--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--empty array--
string(0) ""
--uppercase NULL--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--lowercase null--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--lowercase true--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--lowercase false--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--uppercase TRUE--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--uppercase FALSE--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--empty string DQ--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--empty string SQ--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--instance of classWithToString--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--instance of classWithoutToString--
string(0) ""
--undefined var--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--unset var--
-Error: 2 - mcrypt_decrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_decrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--resource--
key length=8
-Warning: mcrypt_ecb(): Key of length 8 not supported by this algorithm in %s on line %d
+Warning: mcrypt_ecb(): Key of size 8 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=20
-Warning: mcrypt_ecb(): Key of length 20 not supported by this algorithm in %s on line %d
+Warning: mcrypt_ecb(): Key of size 20 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=24
key length=26
-Warning: mcrypt_ecb(): Key of length 26 not supported by this algorithm in %s on line %d
+Warning: mcrypt_ecb(): Key of size 26 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
--- testing different iv lengths
key length=8
-Warning: mcrypt_ecb(): Key of length 8 not supported by this algorithm in %s on line %d
+Warning: mcrypt_ecb(): Key of size 8 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=20
-Warning: mcrypt_ecb(): Key of length 20 not supported by this algorithm in %s on line %d
+Warning: mcrypt_ecb(): Key of size 20 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=24
key length=26
-Warning: mcrypt_ecb(): Key of length 26 not supported by this algorithm in %s on line %d
+Warning: mcrypt_ecb(): Key of size 26 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
--- testing different iv lengths
*** Testing mcrypt_ecb() : usage variation ***
--int 0--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--int 1--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--int 12345--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--int -12345--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float 10.5--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float -10.5--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float 12.3456789000e10--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float -12.3456789000e10--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float .5--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--empty array--
string(0) ""
--uppercase NULL--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--lowercase null--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--lowercase true--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--lowercase false--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--uppercase TRUE--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--uppercase FALSE--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--empty string DQ--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--empty string SQ--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--instance of classWithToString--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--instance of classWithoutToString--
string(0) ""
--undefined var--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--unset var--
-Error: 2 - mcrypt_ecb(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_ecb(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--resource--
key length=8
-Warning: mcrypt_encrypt(): Key of length 8 not supported by this algorithm in %s on line %d
+Warning: mcrypt_encrypt(): Key of size 8 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=20
-Warning: mcrypt_encrypt(): Key of length 20 not supported by this algorithm in %s on line %d
+Warning: mcrypt_encrypt(): Key of size 20 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=24
key length=26
-Warning: mcrypt_encrypt(): Key of length 26 not supported by this algorithm in %s on line %d
+Warning: mcrypt_encrypt(): Key of size 26 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
--- testing different iv lengths
key length=8
-Warning: mcrypt_encrypt(): Key of length 8 not supported by this algorithm in %s on line %d
+Warning: mcrypt_encrypt(): Key of size 8 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=20
-Warning: mcrypt_encrypt(): Key of length 20 not supported by this algorithm in %s on line %d
+Warning: mcrypt_encrypt(): Key of size 20 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
key length=24
key length=26
-Warning: mcrypt_encrypt(): Key of length 26 not supported by this algorithm in %s on line %d
+Warning: mcrypt_encrypt(): Key of size 26 not supported by this algorithm. Only keys of size 24 supported in %s on line %d
string(0) ""
--- testing different iv lengths
*** Testing mcrypt_encrypt() : usage variation ***
--int 0--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--int 1--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--int 12345--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--int -12345--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float 10.5--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float -10.5--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float 12.3456789000e10--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float -12.3456789000e10--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--float .5--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--empty array--
string(0) ""
--uppercase NULL--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--lowercase null--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--lowercase true--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--lowercase false--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--uppercase TRUE--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--uppercase FALSE--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--empty string DQ--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--empty string SQ--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--instance of classWithToString--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--instance of classWithoutToString--
string(0) ""
--undefined var--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--unset var--
-Error: 2 - mcrypt_encrypt(): Key of length %d not supported by this algorithm, %s(%d)
+Error: 2 - mcrypt_encrypt(): Key of size %d not supported by this algorithm. Only keys of size 24 supported, %s(%d)
string(0) ""
--resource--
key length=0
-Warning: mcrypt_encrypt(): Key of length 0 not supported by this algorithm in %s on line %d
+Warning: mcrypt_encrypt(): Key of size 0 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in %s on line %d
string(0) ""
Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
-Warning: mcrypt_cbc(): Key of length 0 not supported by this algorithm in %s on line %d
+Warning: mcrypt_cbc(): Key of size 0 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in %s on line %d
string(0) ""
key length=0
-Warning: mcrypt_encrypt(): Key of length 0 not supported by this algorithm in %s on line %d
+Warning: mcrypt_encrypt(): Key of size 0 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in %s on line %d
string(0) ""
Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
-Warning: mcrypt_cbc(): Key of length 0 not supported by this algorithm in %s on line %d
+Warning: mcrypt_cbc(): Key of size 0 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in %s on line %d
string(0) ""
key length=8
-Warning: mcrypt_encrypt(): Key of length 8 not supported by this algorithm in %s on line %d
+Warning: mcrypt_encrypt(): Key of size 8 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in %s on line %d
string(0) ""
Deprecated: Function mcrypt_cbc() is deprecated in %s on line %d
-Warning: mcrypt_cbc(): Key of length 8 not supported by this algorithm in %s on line %d
+Warning: mcrypt_cbc(): Key of size 8 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in %s on line %d
string(0) ""
key length=16
key length=20
-Warning: mcrypt_encrypt(): Key of length 20 not supported by this algorithm in %s on line %d
+Warning: mcrypt_encrypt(): Key of size 20 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in %s on line %d
string(0) ""
-Warning: mcrypt_decrypt(): Key of length 20 not supported by this algorithm in %s on line %d
+Warning: mcrypt_decrypt(): Key of size 20 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in %s on line %d
string(0) ""
key length=24
key length=30
-Warning: mcrypt_encrypt(): Key of length 30 not supported by this algorithm in %s on line %d
+Warning: mcrypt_encrypt(): Key of size 30 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in %s on line %d
string(0) ""
-Warning: mcrypt_decrypt(): Key of length 30 not supported by this algorithm in %s on line %d
+Warning: mcrypt_decrypt(): Key of size 30 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in %s on line %d
string(0) ""
key length=32
key length=40
-Warning: mcrypt_encrypt(): Key of length 40 not supported by this algorithm in %s on line %d
+Warning: mcrypt_encrypt(): Key of size 40 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in %s on line %d
string(0) ""
-Warning: mcrypt_decrypt(): Key of length 40 not supported by this algorithm in %s on line %d
+Warning: mcrypt_decrypt(): Key of size 40 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in %s on line %d
string(0) ""
===DONE===