uTools-Manuals/docs/php/hash_hmac_algos.html
2019-04-28 19:00:34 +08:00

122 lines
4.4 KiB
HTML

<!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>Return a list of registered hashing algorithms suitable for hash_hmac</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.hash-hmac-algos" class="refentry">
<div class="refnamediv">
<h1 class="refname">hash_hmac_algos</h1>
<p class="verinfo">(PHP 7 &gt;= 7.2.0)</p><p class="refpurpose"><span class="refname">hash_hmac_algos</span> &mdash; <span class="dc-title">Return a list of registered hashing algorithms suitable for hash_hmac</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.hash-hmac-algos-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>hash_hmac_algos</strong></span>
( <span class="methodparam">void</span>
) : <span class="type">array</span></div>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.hash-hmac-algos-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
Returns a numerically indexed array containing the list of supported hashing
algorithms suitable for <span class="function"><a href="hash_hmac.html" class="function">hash_hmac()</a></span>.
</p>
</div>
<div class="refsect1 examples" id="refsect1-function.hash-hmac-algos-examples">
<h3 class="title">范例</h3>
<div class="example" id="example-894">
<p><strong>Example #1 <span class="function"><strong>hash_hmac_algos()</strong></span> example</strong></p>
<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_hmac_algos</span><span style="color: #007700">());</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/224
[8] =&gt; sha512/256
[9] =&gt; sha512
[10] =&gt; sha3-224
[11] =&gt; sha3-256
[12] =&gt; sha3-384
[13] =&gt; sha3-512
[14] =&gt; ripemd128
[15] =&gt; ripemd160
[16] =&gt; ripemd256
[17] =&gt; ripemd320
[18] =&gt; whirlpool
[19] =&gt; tiger128,3
[20] =&gt; tiger160,3
[21] =&gt; tiger192,3
[22] =&gt; tiger128,4
[23] =&gt; tiger160,4
[24] =&gt; tiger192,4
[25] =&gt; snefru
[26] =&gt; snefru256
[27] =&gt; gost
[28] =&gt; gost-crypto
[29] =&gt; haval128,3
[30] =&gt; haval160,3
[31] =&gt; haval192,3
[32] =&gt; haval224,3
[33] =&gt; haval256,3
[34] =&gt; haval128,4
[35] =&gt; haval160,4
[36] =&gt; haval192,4
[37] =&gt; haval224,4
[38] =&gt; haval256,4
[39] =&gt; haval128,5
[40] =&gt; haval160,5
[41] =&gt; haval192,5
[42] =&gt; haval224,5
[43] =&gt; haval256,5
)
</pre></div>
</div>
</div>
</div>
<div class="refsect1 notes" id="refsect1-function.hash-hmac-algos-notes">
<h3 class="title">注释</h3>
<blockquote class="note"><p><strong class="note">Note</strong>:
<p class="para">
Before PHP 7.2.0 the only means to get a list of supported hash algorithms
has been to call <span class="function"><a href="hash_algos.html" class="function">hash_algos()</a></span> which also returns hash
algorithms that are not suitable for <span class="function"><a href="hash_hmac.html" class="function">hash_hmac()</a></span>.
</p>
</p></blockquote>
</div>
<div class="refsect1 seealso" id="refsect1-function.hash-hmac-algos-seealso">
<h3 class="title">参见</h3>
<ul class="simplelist">
<li class="member"><span class="function"><a href="hash_hmac.html" class="function" rel="rdfs-seeAlso">hash_hmac()</a> - 使用 HMAC 方法生成带有密钥的哈希值</span></li>
<li class="member"><span class="function"><a href="hash_algos.html" class="function" rel="rdfs-seeAlso">hash_algos()</a> - 返回已注册的哈希算法列表</span></li>
</ul>
</div>
</div></div></div></body></html>