Revision 19792,
449 bytes
checked in by Seasoft, 13 years ago
(diff) |
#744(PHP4 互換用途ソースを将来的に切り捨てやすい仕組みづくり)
|
Line | |
---|
1 | --TEST--
|
---|
2 | Function -- mhash
|
---|
3 | --SKIPIF--
|
---|
4 | <?php if (function_exists('mhash')) { echo 'skip'; } ?>
|
---|
5 | --FILE--
|
---|
6 | <?php
|
---|
7 | require_once 'PHP/Compat.php';
|
---|
8 | PHP_Compat::loadFunction('mhash');
|
---|
9 |
|
---|
10 | $input = "what do ya want for nothing?";
|
---|
11 |
|
---|
12 | $hash = mhash(MHASH_MD5, $input);
|
---|
13 | echo bin2hex($hash) . "\n";
|
---|
14 |
|
---|
15 | $hash = mhash(MHASH_MD5, $input, "Jefe");
|
---|
16 | echo bin2hex($hash) . "\n";
|
---|
17 | ?>
|
---|
18 | --EXPECT--
|
---|
19 | ae2e4b39f3b5ee2c8b585994294201ea
|
---|
20 | 750c783e6ab0b503eaa86e310a5db738 |
---|
Note: See
TracBrowser
for help on using the repository browser.