Revision 20119,
430 bytes
checked in by nanasess, 13 years ago
(diff) |
module 以下は svn:keywords を除外
|
-
Property svn:eol-style set to
LF
|
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.