summaryrefslogtreecommitdiff
path: root/ext/mcrypt
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2012-08-13 22:06:18 +0200
committerNikita Popov <nikic@php.net>2012-08-13 22:06:18 +0200
commitf19351b50330a3a838b8e3bba4ec95ebb5a8d5b7 (patch)
tree10e31ada8a7ebc1c0ba2749576ee551531377358 /ext/mcrypt
parent212cfb95d1c7eb7202e1386294808eceef386b78 (diff)
parent7aed2390503bfe91c91eec67ed0c88b12ff3612c (diff)
downloadphp-git-f19351b50330a3a838b8e3bba4ec95ebb5a8d5b7.tar.gz
Merge branch 'PHP-5.3' into PHP-5.4
Diffstat (limited to 'ext/mcrypt')
-rw-r--r--ext/mcrypt/tests/mcrypt_cfb.phpt (renamed from ext/mcrypt/tests/mcrypt_cbf.phpt)6
-rw-r--r--ext/mcrypt/tests/mcrypt_create_iv.phpt8
2 files changed, 7 insertions, 7 deletions
diff --git a/ext/mcrypt/tests/mcrypt_cbf.phpt b/ext/mcrypt/tests/mcrypt_cfb.phpt
index 8ec3cd7d3e..54919c8589 100644
--- a/ext/mcrypt/tests/mcrypt_cbf.phpt
+++ b/ext/mcrypt/tests/mcrypt_cfb.phpt
@@ -1,5 +1,5 @@
--TEST--
-mcrypt_cbf
+mcrypt_cfb
--SKIPIF--
<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
--FILE--
@@ -8,7 +8,7 @@ $key = "FooBar";
$secret = "PHP Testfest 2008";
$cipher = MCRYPT_RIJNDAEL_128;
-$iv = mcrypt_create_iv(mcrypt_get_iv_size($cipher, MCRYPT_MODE_ECB), MCRYPT_RAND);
+$iv = mcrypt_create_iv(mcrypt_get_iv_size($cipher, MCRYPT_MODE_CFB), MCRYPT_RAND);
$enc_data = mcrypt_cfb($cipher, $key, $secret, MCRYPT_ENCRYPT, $iv);
// we have to trim as AES rounds the blocks and decrypt doesnt detect that
@@ -20,4 +20,4 @@ mcrypt_cfb($cipher, $key, $enc_data, MCRYPT_DECRYPT);
--EXPECTF--
PHP Testfest 2008
-Warning: mcrypt_cfb(): Attempt to use an empty IV, which is NOT recommend in %s on line %d \ No newline at end of file
+Warning: mcrypt_cfb(): Attempt to use an empty IV, which is NOT recommend in %s on line %d
diff --git a/ext/mcrypt/tests/mcrypt_create_iv.phpt b/ext/mcrypt/tests/mcrypt_create_iv.phpt
index cf6456fef7..1aa48868b0 100644
--- a/ext/mcrypt/tests/mcrypt_create_iv.phpt
+++ b/ext/mcrypt/tests/mcrypt_create_iv.phpt
@@ -5,13 +5,13 @@ mcrypt_create_iv
--FILE--
<?php
$iv1 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_RAND);
-$iv2 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_192, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM);
-$iv3 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_DEV_RANDOM);
+$iv2 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM);
+$iv3 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_RANDOM);
echo strlen($iv1) . "\n";
echo strlen($iv2) . "\n";
echo strlen($iv3) . "\n";
--EXPECT--
16
-24
-32
+16
+16