com php-src: Rename mcrypt_cbf -> mcrypt_cfb: ext /mcrypt/tests/mcrypt_cbf.phpt ext/mcrypt/tests/mcrypt_c fb.phpt
| From: | Nikita Popov | Date: | Mon, 13 Aug 2012 20:01:03 +0000 |
| Subject: | com php-src: Rename mcrypt_cbf -> mcrypt_cfb: ext /mcrypt/tests/mcrypt_cbf.phpt ext/mcrypt/tests/mcrypt_c fb.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-69823@lists.php.net to get a copy of this message | ||
Commit: 9bc1af1e5855c8cfc6886b5aaedbcb86a2ef42d7
Author: Nikita Popov <nikic@php.net> Mon, 13 Aug 2012 21:44:50 +0200
Parents: 4970926e4543c15e16b0c047d85dddfb4c09b581
Branches: PHP-5.3 PHP-5.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9bc1af1e5855c8cfc6886b5aaedbcb86a2ef42d7
Log:
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).
Changed paths:
D ext/mcrypt/tests/mcrypt_cbf.phpt
A ext/mcrypt/tests/mcrypt_cfb.phpt
Diff:
diff --git a/ext/mcrypt/tests/mcrypt_cbf.phpt b/ext/mcrypt/tests/mcrypt_cbf.phpt
deleted file mode 100644
index 8ec3cd7..0000000
--- a/ext/mcrypt/tests/mcrypt_cbf.phpt
+++ /dev/null
@@ -1,23 +0,0 @@
---TEST--
-mcrypt_cbf
---SKIPIF--
-<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
---FILE--
-<?php
-$key = "FooBar";
-$secret = "PHP Testfest 2008";
-$cipher = MCRYPT_RIJNDAEL_128;
-
-$iv = mcrypt_create_iv(mcrypt_get_iv_size($cipher, MCRYPT_MODE_ECB), 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
-echo trim(mcrypt_cfb($cipher, $key, $enc_data, MCRYPT_DECRYPT, $iv)) . "\n";
-
-// a warning must be issued if we don't use a IV on a AES cipher, that usually requires an IV
-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
diff --git a/ext/mcrypt/tests/mcrypt_cfb.phpt b/ext/mcrypt/tests/mcrypt_cfb.phpt
new file mode 100644
index 0000000..54919c8
--- /dev/null
+++ b/ext/mcrypt/tests/mcrypt_cfb.phpt
@@ -0,0 +1,23 @@
+--TEST--
+mcrypt_cfb
+--SKIPIF--
+<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
+--FILE--
+<?php
+$key = "FooBar";
+$secret = "PHP Testfest 2008";
+$cipher = MCRYPT_RIJNDAEL_128;
+
+$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
+echo trim(mcrypt_cfb($cipher, $key, $enc_data, MCRYPT_DECRYPT, $iv)) . "\n";
+
+// a warning must be issued if we don't use a IV on a AES cipher, that usually requires an IV
+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