Skip to content

Commit 5bf4c5f

Browse files
committed
Merge branch 'PHP-5.4'
2 parents 7066be5 + f19351b commit 5bf4c5f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ext/mcrypt/tests/mcrypt_cbf.phpt renamed to ext/mcrypt/tests/mcrypt_cfb.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
mcrypt_cbf
2+
mcrypt_cfb
33
--SKIPIF--
44
<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
55
--FILE--
@@ -8,7 +8,7 @@ $key = "FooBar";
88
$secret = "PHP Testfest 2008";
99
$cipher = MCRYPT_RIJNDAEL_128;
1010

11-
$iv = mcrypt_create_iv(mcrypt_get_iv_size($cipher, MCRYPT_MODE_ECB), MCRYPT_RAND);
11+
$iv = mcrypt_create_iv(mcrypt_get_iv_size($cipher, MCRYPT_MODE_CFB), MCRYPT_RAND);
1212
$enc_data = mcrypt_cfb($cipher, $key, $secret, MCRYPT_ENCRYPT, $iv);
1313

1414
// 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);
2020
--EXPECTF--
2121
PHP Testfest 2008
2222

23-
Warning: mcrypt_cfb(): Attempt to use an empty IV, which is NOT recommend in %s on line %d
23+
Warning: mcrypt_cfb(): Attempt to use an empty IV, which is NOT recommend in %s on line %d

ext/mcrypt/tests/mcrypt_create_iv.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ mcrypt_create_iv
55
--FILE--
66
<?php
77
$iv1 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_RAND);
8-
$iv2 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_192, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM);
9-
$iv3 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_DEV_RANDOM);
8+
$iv2 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM);
9+
$iv3 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_RANDOM);
1010

1111
echo strlen($iv1) . "\n";
1212
echo strlen($iv2) . "\n";
1313
echo strlen($iv3) . "\n";
1414
--EXPECT--
1515
16
16-
24
17-
32
16+
16
17+
16

0 commit comments

Comments
 (0)