Lines Matching refs:hash_file

2 Test hash_file() function : basic functionality 
8 /* Prototype : string hash_file ( string algo, string filename [, bool raw_output] )
14 echo "*** Testing hash_file() : basic functionality ***\n";
16 $file = dirname(__FILE__) . "hash_file.txt";
24 $content = "This is a sample string used to test the hash_file function with various hashing algori…
35 echo "adler32: " . hash_file('adler32', $file) . "\n";
36 echo "crc32: " . hash_file('crc32', $file) . "\n";
37 echo "gost: " . hash_file('gost', $file). "\n";
38 echo "haval128,3: " . hash_file('haval128,3', $file). "\n";
39 echo "md2: " . hash_file('md2', $file). "\n";
40 echo "md4: " . hash_file('md4', $file). "\n";
41 echo "md5: " . hash_file('md5', $file). "\n";
42 echo "ripemd128: " . hash_file('ripemd128', $file). "\n";
43 echo "ripemd160: " . hash_file('ripemd160', $file). "\n";
44 echo "ripemd256: " . hash_file('ripemd256', $file). "\n";
45 echo "ripemd320: " . hash_file('ripemd320', $file). "\n";
46 echo "sha1: " . hash_file('sha1', $file). "\n";
47 echo "sha256: " . hash_file('sha256', $file). "\n";
48 echo "sha384: " . hash_file('sha384', $file). "\n";
49 echo "sha512: " . hash_file('sha512', $file). "\n";
50 echo "snefru: " . hash_file('snefru', $file). "\n";
51 echo "tiger192,3: " . hash_file('tiger192,3', $file). "\n";
52 echo "whirlpool: " . hash_file('whirlpool', $file). "\n";
54 echo "adler32(raw): " . bin2hex(hash_file('adler32', $file, TRUE)) . "\n";
55 echo "md5(raw): " . bin2hex(hash_file('md5', $file, TRUE)). "\n";
56 echo "sha256(raw): " . bin2hex(hash_file('sha256', $file, TRUE)). "\n";
63 *** Testing hash_file() : basic functionality ***