Skip to content

Commit 9bc1af1

Browse files
committed
Rename mcrypt_cbf -> mcrypt_cfb
Also fix ECB -> CFB in the initialization vector size call (not that it makes a difference, they have the same size).
1 parent 4970926 commit 9bc1af1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
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

0 commit comments

Comments
 (0)