Browse Source

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).
pull/168/merge
Nikita Popov 13 years ago
parent
commit
9bc1af1e58
  1. 4
      ext/mcrypt/tests/mcrypt_cfb.phpt

4
ext/mcrypt/tests/mcrypt_cbf.phpt → 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
Loading…
Cancel
Save