uTools-Manuals/docs/php/hash_algos.html
2019-04-08 23:22:26 +08:00

165 lines
4.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>返回已注册的哈希算法列表</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.hash-algos" class="refentry">
<div class="refnamediv">
<h1 class="refname">hash_algos</h1>
<p class="verinfo">(PHP 5 &gt;= 5.1.2, PHP 7, PECL hash &gt;= 1.1)</p><p class="refpurpose"><span class="refname">hash_algos</span> &mdash; <span class="dc-title">返回已注册的哈希算法列表</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.hash-algos-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>hash_algos</strong></span>
( <span class="methodparam">void</span>
) : <span class="type">array</span></div>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.hash-algos-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
返回一个数值索引的数组,
包含了受支持的哈希算法名称。
</p>
</div>
<div class="refsect1 changelog" id="refsect1-function.hash-algos-changelog">
<h3 class="title">更新日志</h3>
<p class="para">
<table class="doctable informaltable">
<thead>
<tr>
<th>版本</th>
<th>说明</th>
</tr>
</thead>
<tbody class="tbody">
<tr>
<td>7.1.0</td>
<td>
加入 sha512/224sha512/256sha3-224sha3-256sha3-384 以及
sha3-512 算法的支持。
</td>
</tr>
<tr>
<td>5.6.0</td>
<td>
加入对 gost-crypto 算法的支持。
参照 <a href="http://www.faqs.org/rfcs/rfc4357" class="link external">&raquo;&nbsp;RFC 435711.2 小节</a>
定义的 CryptoPro S-box 表格实现 GOST 哈希函数。
</td>
</tr>
<tr>
<td>5.4.0</td>
<td>加入对于 joaatfnv132 和 fnv164 算法的支持。移除 Salsa10 和 Salsa20 算法。</td>
</tr>
<tr>
<td>5.3.0</td>
<td>加入对 md2ripemd256ripemd320salsa10salsa20snefru256 和 sha224 哈希算法的支持。</td>
</tr>
</tbody>
</table>
</p>
</div>
<div class="refsect1 examples" id="refsect1-function.hash-algos-examples">
<h3 class="title">范例</h3>
<p class="para">
<div class="example" id="example-888">
<p><strong>Example #1 <span class="function"><strong>hash_algos()</strong></span> 例程</strong></p>
<div class="example-contents"><p>
在 PHP 5.6.0 中,<span class="function"><strong>hash_algos()</strong></span>
会返回下表所示的算法清单:
</p></div>
<div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">hash_algos</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
</div>
<div class="example-contents"><p>以上例程的输出类似于:</p></div>
<div class="example-contents screen">
<div class="cdata"><pre>
Array
(
[0] =&gt; md2
[1] =&gt; md4
[2] =&gt; md5
[3] =&gt; sha1
[4] =&gt; sha224
[5] =&gt; sha256
[6] =&gt; sha384
[7] =&gt; sha512
[8] =&gt; ripemd128
[9] =&gt; ripemd160
[10] =&gt; ripemd256
[11] =&gt; ripemd320
[12] =&gt; whirlpool
[13] =&gt; tiger128,3
[14] =&gt; tiger160,3
[15] =&gt; tiger192,3
[16] =&gt; tiger128,4
[17] =&gt; tiger160,4
[18] =&gt; tiger192,4
[19] =&gt; snefru
[20] =&gt; snefru256
[21] =&gt; gost
[22] =&gt; gost-crypto
[23] =&gt; adler32
[24] =&gt; crc32
[25] =&gt; crc32b
[26] =&gt; fnv132
[27] =&gt; fnv1a32
[28] =&gt; fnv164
[29] =&gt; fnv1a64
[30] =&gt; joaat
[31] =&gt; haval128,3
[32] =&gt; haval160,3
[33] =&gt; haval192,3
[34] =&gt; haval224,3
[35] =&gt; haval256,3
[36] =&gt; haval128,4
[37] =&gt; haval160,4
[38] =&gt; haval192,4
[39] =&gt; haval224,4
[40] =&gt; haval256,4
[41] =&gt; haval128,5
[42] =&gt; haval160,5
[43] =&gt; haval192,5
[44] =&gt; haval224,5
[45] =&gt; haval256,5
)
</pre></div>
</div>
</div>
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.hash-algos-seealso">
<h3 class="title">参见</h3>
<ul class="simplelist">
<li class="member"><span class="function"><a href="hash_hmac_algos.html" class="function" rel="rdfs-seeAlso">hash_hmac_algos()</a> - Return a list of registered hashing algorithms suitable for hash_hmac</span></li>
</ul>
</div>
</div></div></div></body></html>