Revision 19986,
812 bytes
checked in by AMUAMU, 13 years ago
(diff) |
#818 (パスワードリマインダの答えのハッシュ暗号化) の解決
#819 (パスワードのハッシュ暗号化の強化) の解決
#335 (パスワードリマインダの改修) の準備修正
#895 (会員登録完了ページのタイトル異常) の解決
#899 (会員登録時にパスワードが正しく登録されない) の解決
#744 (PHP4 互換用途ソースを将来的に切り捨てやすい仕組みづくり) 関連の修正も含む
|
Line | |
---|
1 | --TEST-- |
---|
2 | Function -- hash |
---|
3 | --FILE-- |
---|
4 | <?php |
---|
5 | require_once 'PHP/Compat/Function/hash.php'; |
---|
6 | |
---|
7 | $content = "This is a sample string used to test the hash function with various hashing algorithms"; |
---|
8 | |
---|
9 | echo "md5: " . php_compat_hash('md5', $content). "\n"; |
---|
10 | echo "sha1: " . php_compat_hash('sha1', $content). "\n"; |
---|
11 | echo "sha256: " . php_compat_hash('sha256', $content). "\n"; |
---|
12 | echo "md5(raw): " . bin2hex(php_compat_hash('md5', $content, true)). "\n"; |
---|
13 | echo "sha256(raw): " . bin2hex(php_compat_hash('sha256', $content, true)). "\n"; |
---|
14 | |
---|
15 | ?> |
---|
16 | --EXPECT-- |
---|
17 | md5: bf33deeefaf5a9413160935be950cc07 |
---|
18 | sha1: f0dc0e88cc1008e46762f40a1b4a4c0b6baedfa0 |
---|
19 | sha256: a78149615dd1ef8aeb22a8254c36edd87713f2e79a052a89ff32ed94e827d47b |
---|
20 | md5(raw): bf33deeefaf5a9413160935be950cc07 |
---|
21 | sha256(raw): a78149615dd1ef8aeb22a8254c36edd87713f2e79a052a89ff32ed94e827d47b |
---|
Note: See
TracBrowser
for help on using the repository browser.