File: bug21039.phpt

package info (click to toggle)
php4 6%3A4.4.4-8%2Betch6
  • links: PTS
  • area: main
  • in suites: etch
  • size: 35,068 kB
  • ctags: 39,148
  • sloc: ansic: 340,486; php: 34,786; cpp: 10,150; sh: 9,010; lex: 2,180; yacc: 1,712; xml: 1,335; makefile: 559; awk: 466; java: 455; perl: 154
file content (19 lines) | stat: -rw-r--r-- 490 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--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!