1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00
Files
archived-php-src/ext/mcrypt/tests/bug21039.phpt
T
Derick Rethans bd59a23e0a - Fix bug #21039
#- This is somewhat of a hack, and thus I will not merge it to HEAD, as
#  I've lots of other commits waiting for that.
2002-12-16 09:03:11 +00:00

20 lines
490 B
PHP

--TEST--
Bug #21039
--SKIPIF--
<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
--POST--
--GET--
--FILE--
<?php
error_reporting(E_ALL);
$nthash = "00000000000000000";
$challenge = "foo";
$td = mcrypt_module_open ('des', '', 'cbc', '');
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size ($td), MCRYPT_RAND);
$var = @mcrypt_generic_init ($td, substr($nthash, 0, 8));
$res = @mcrypt_generic ($td, $challenge);
print "I'm alive!\n";
?>
--EXPECT--
I'm alive!