import zend mcrypt tests
[hiphop-php.git] / hphp / test / zend / good / ext-mcrypt / mcrypt_cbc_error.php
blob5478f44945927c8b47781fbb2068b06585aff703
1 <?php
2 /* Prototype : string mcrypt_cbc(int cipher, string key, string data, int mode, string iv)
3 * Description: CBC crypt/decrypt data using key key with cipher cipher starting with iv
4 * Source code: ext/mcrypt/mcrypt.c
5 * Alias to functions:
6 */
8 echo "*** Testing mcrypt_cbc() : error conditions ***\n";
11 //Test mcrypt_cbc with one more than the expected number of arguments
12 echo "\n-- Testing mcrypt_cbc() function with more than expected no. of arguments --\n";
13 $cipher = 10;
14 $key = 'string_val';
15 $data = 'string_val';
16 $mode = 10;
17 $iv = 'string_val';
18 $extra_arg = 10;
19 var_dump( mcrypt_cbc($cipher, $key, $data, $mode, $iv, $extra_arg) );
21 // Testing mcrypt_cbc with one less than the expected number of arguments
22 echo "\n-- Testing mcrypt_cbc() function with less than expected no. of arguments --\n";
23 $cipher = 10;
24 $key = 'string_val';
25 $data = 'string_val';
26 var_dump( mcrypt_cbc($cipher, $key, $data) );
29 ===DONE===