xref: /PHP-5.4/ext/mcrypt/tests/bug8040.phpt (revision 1f655451)
1--TEST--
2Bug #8040 (MCRYPT_MODE_* do not seem to exist)
3--SKIPIF--
4<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
5--FILE--
6<?php
7	error_reporting (E_ALL ^ E_NOTICE);
8	echo MCRYPT_TWOFISH."\n";
9	echo MCRYPT_MODE_CBC."\n";
10
11	define ("MODE1", MCRYPT_MODE_CBC);
12	echo MODE1."\n";
13
14	define ("CIPHER", MCRYPT_TWOFISH);
15	define ("MODE2", MCRYPT_MODE_CBC);
16	define ("MODE3", MCRYPT_CBC);
17
18	printf ("cipher=".CIPHER. " mode1=".MODE2. " mode2=". MODE3."\n");
19?>
20--EXPECT--
21twofish
22cbc
23cbc
24cipher=twofish mode1=cbc mode2=MCRYPT_CBC
25